]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: sm750fb: move MHz() and roundedDiv() close to their usage
authorMike Rapoport <mike.rapoport@gmail.com>
Fri, 19 Feb 2016 15:56:14 +0000 (17:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 23:33:00 +0000 (15:33 -0800)
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>
drivers/staging/sm750fb/ddk750_chip.c
drivers/staging/sm750fb/sm750_help.h

index 02157f87d7309f4fae54451e71d2c247096e8a53..95f7cae3cc238629cffd043d13678f23e0381023 100644 (file)
@@ -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;
index ce94d29588fe71f4bf88e3516b064d9d0606aac0..833cf16e942b2de4b2929cd19fdc987aa04bacc2 100644 (file)
 #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