summaryrefslogtreecommitdiff
path: root/drivers/staging/sm750fb
diff options
context:
space:
mode:
authorMike Rapoport <mike.rapoport@gmail.com>2016-02-19 17:56:14 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-20 15:33:00 -0800
commit603dd4932e9f22f20c30a0200608a1b9588013be (patch)
tree44563a8c80114c48b49a335f8f576b42c0ba4e3e /drivers/staging/sm750fb
parente074da3f80a6a2c5eb4ed6758f143ee17ddbba56 (diff)
staging: sm750fb: move MHz() and roundedDiv() close to their usage
The MHz() and roundedDiv macros are used only by ddk750_chip.c, so move their definition there. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sm750fb')
-rw-r--r--drivers/staging/sm750fb/ddk750_chip.c4
-rw-r--r--drivers/staging/sm750fb/sm750_help.h7
2 files changed, 4 insertions, 7 deletions
diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
index 02157f87d730..95f7cae3cc23 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -6,6 +6,10 @@
#include "ddk750_chip.h"
#include "ddk750_power.h"
+/* n / d + 1 / 2 = (2n + d) / 2d */
+#define roundedDiv(num, denom) ((2 * (num) + (denom)) / (2 * (denom)))
+#define MHz(x) ((x) * 1000000)
+
logical_chip_type_t getChipType(void)
{
unsigned short physicalID;
diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h
index ce94d29588fe..833cf16e942b 100644
--- a/drivers/staging/sm750fb/sm750_help.h
+++ b/drivers/staging/sm750fb/sm750_help.h
@@ -38,11 +38,4 @@
#define FIELD_SIZE(field) (1 + FIELD_END(field) - FIELD_START(field))
#define FIELD_MASK(field) (((1 << (FIELD_SIZE(field)-1)) | ((1 << (FIELD_SIZE(field)-1)) - 1)) << FIELD_START(field))
-/* n / d + 1 / 2 = (2n + d) / 2d */
-#define roundedDiv(num, denom) ((2 * (num) + (denom)) / (2 * (denom)))
-#define MHz(x) ((x) * 1000000)
-
-
-
-
#endif