Commit 603dd493 authored by Mike Rapoport's avatar Mike Rapoport Committed by Greg Kroah-Hartman

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: default avatarMike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e074da3f
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
#include "ddk750_chip.h" #include "ddk750_chip.h"
#include "ddk750_power.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) logical_chip_type_t getChipType(void)
{ {
unsigned short physicalID; unsigned short physicalID;
......
...@@ -38,11 +38,4 @@ ...@@ -38,11 +38,4 @@
#define FIELD_SIZE(field) (1 + FIELD_END(field) - FIELD_START(field)) #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)) #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 #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment