summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-11-11 14:05:25 +0000
committerGary King <gking@nvidia.com>2010-05-17 19:41:39 -0700
commite9f0dfbcea0fb0a00acc4ee5a67f81ce1464aa55 (patch)
tree0ef57992f188198d02921dc813f2c275168700b7 /include
parent61faf2386d4000fb4bf6b471fb210e021fb2b826 (diff)
clockevents: Use u32 for mult and shift factors
The mult and shift factors of clock events differ in their data type from those of clock sources for no reason. u32 is sufficient for both. shift is always <= 32 and mult is limited to 2^32-1 to avoid 64bit multiplication overflows in the conversion. Preparatory patch for a generic mult/shift factor calculation function. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Mikael Pettersson <mikpe@it.uu.se> Acked-by: Ralf Baechle <ralf@linux-mips.org> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Cc: John Stultz <johnstul@us.ibm.com> LKML-Reference: <20091111134229.725664788@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/clockchips.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 3a1dbba4d3ae..3b5841016276 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -79,8 +79,8 @@ struct clock_event_device {
unsigned int features;
unsigned long max_delta_ns;
unsigned long min_delta_ns;
- unsigned long mult;
- int shift;
+ u32 mult;
+ u32 shift;
int rating;
int irq;
const struct cpumask *cpumask;