diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-04-21 15:24:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-21 16:41:47 -0400 |
commit | 8e19608e8b5c001e4a66ce482edc474f05fb7355 (patch) | |
tree | 06af4be339136da7476396604c30112238d84339 /arch/mips/kernel/csrc-ioasic.c | |
parent | ff14ed5db6e7e5e5dc23712d3c877891d4d9a1a8 (diff) |
clocksource: pass clocksource to read() callback
Pass clocksource pointer to the read() callback for clocksources. This
allows us to share the callback between multiple instances.
[hugh@veritas.com: fix powerpc build of clocksource pass clocksource mods]
[akpm@linux-foundation.org: cleanup]
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: John Stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mips/kernel/csrc-ioasic.c')
-rw-r--r-- | arch/mips/kernel/csrc-ioasic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/mips/kernel/csrc-ioasic.c b/arch/mips/kernel/csrc-ioasic.c index 1d5f63cf8997..b551f48d3a07 100644 --- a/arch/mips/kernel/csrc-ioasic.c +++ b/arch/mips/kernel/csrc-ioasic.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <asm/dec/ioasic.h> | 25 | #include <asm/dec/ioasic.h> |
26 | #include <asm/dec/ioasic_addrs.h> | 26 | #include <asm/dec/ioasic_addrs.h> |
27 | 27 | ||
28 | static cycle_t dec_ioasic_hpt_read(void) | 28 | static cycle_t dec_ioasic_hpt_read(struct clocksource *cs) |
29 | { | 29 | { |
30 | return ioasic_read(IO_REG_FCTR); | 30 | return ioasic_read(IO_REG_FCTR); |
31 | } | 31 | } |
@@ -47,13 +47,13 @@ void __init dec_ioasic_clocksource_init(void) | |||
47 | while (!ds1287_timer_state()) | 47 | while (!ds1287_timer_state()) |
48 | ; | 48 | ; |
49 | 49 | ||
50 | start = dec_ioasic_hpt_read(); | 50 | start = dec_ioasic_hpt_read(&clocksource_dec); |
51 | 51 | ||
52 | while (i--) | 52 | while (i--) |
53 | while (!ds1287_timer_state()) | 53 | while (!ds1287_timer_state()) |
54 | ; | 54 | ; |
55 | 55 | ||
56 | end = dec_ioasic_hpt_read(); | 56 | end = dec_ioasic_hpt_read(&clocksource_dec); |
57 | 57 | ||
58 | freq = (end - start) * 10; | 58 | freq = (end - start) * 10; |
59 | printk(KERN_INFO "I/O ASIC clock frequency %dHz\n", freq); | 59 | printk(KERN_INFO "I/O ASIC clock frequency %dHz\n", freq); |