diff options
author | Jim Cromie <jim.cromie@gmail.com> | 2006-06-26 09:25:15 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 18:58:21 +0200 |
commit | 7f9f303aa33c7acc7b4aa9ebea25cbd990bc707b (patch) | |
tree | b5916e6b018356afdb5c8687e554a049532633bd /drivers | |
parent | [PATCH] make pmtmr_ioport __read_mostly (diff) | |
download | linux-7f9f303aa33c7acc7b4aa9ebea25cbd990bc707b.tar.xz linux-7f9f303aa33c7acc7b4aa9ebea25cbd990bc707b.zip |
[PATCH] generic-time: add macro to simplify/hide mask constants
Add a CLOCKSOURCE_MASK macro to simplify initializing the mask for a struct
clocksource, and use it to replace literal mask constants in the various
clocksource drivers.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Acked-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clocksource/acpi_pm.c | 2 | ||||
-rw-r--r-- | drivers/clocksource/cyclone.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c index 066dc77433d5..7ad3be8c0f49 100644 --- a/drivers/clocksource/acpi_pm.c +++ b/drivers/clocksource/acpi_pm.c @@ -32,7 +32,7 @@ */ u32 pmtmr_ioport __read_mostly; -#define ACPI_PM_MASK 0xFFFFFF /* limit it to 24 bits */ +#define ACPI_PM_MASK CLOCKSOURCE_MASK(24) /* limit it to 24 bits */ static inline u32 read_pmtmr(void) { diff --git a/drivers/clocksource/cyclone.c b/drivers/clocksource/cyclone.c index 5906a0af825d..bf4d3d50d1c4 100644 --- a/drivers/clocksource/cyclone.c +++ b/drivers/clocksource/cyclone.c @@ -14,7 +14,7 @@ #define CYCLONE_MPCS_OFFSET 0x51A8 /* offset to select register */ #define CYCLONE_MPMC_OFFSET 0x51D0 /* offset to count register */ #define CYCLONE_TIMER_FREQ 99780000 /* 100Mhz, but not really */ -#define CYCLONE_TIMER_MASK 0xFFFFFFFF /* 32 bit mask */ +#define CYCLONE_TIMER_MASK CLOCKSOURCE_MASK(32) /* 32 bit mask */ int use_cyclone = 0; static void __iomem *cyclone_ptr; @@ -28,7 +28,7 @@ static struct clocksource clocksource_cyclone = { .name = "cyclone", .rating = 250, .read = read_cyclone, - .mask = (cycle_t)CYCLONE_TIMER_MASK, + .mask = CYCLONE_TIMER_MASK, .mult = 10, .shift = 0, .is_continuous = 1, |