diff options
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kernel/csrc-r4k.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c index 0e2b5cd81f67..86e026f067bc 100644 --- a/arch/mips/kernel/csrc-r4k.c +++ b/arch/mips/kernel/csrc-r4k.c | |||
@@ -22,12 +22,17 @@ static struct clocksource clocksource_mips = { | |||
22 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 22 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
23 | }; | 23 | }; |
24 | 24 | ||
25 | void __init init_mips_clocksource(void) | 25 | int __init init_mips_clocksource(void) |
26 | { | 26 | { |
27 | if (!cpu_has_counter || !mips_hpt_frequency) | ||
28 | return -ENXIO; | ||
29 | |||
27 | /* Calclate a somewhat reasonable rating value */ | 30 | /* Calclate a somewhat reasonable rating value */ |
28 | clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; | 31 | clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; |
29 | 32 | ||
30 | clocksource_set_clock(&clocksource_mips, mips_hpt_frequency); | 33 | clocksource_set_clock(&clocksource_mips, mips_hpt_frequency); |
31 | 34 | ||
32 | clocksource_register(&clocksource_mips); | 35 | clocksource_register(&clocksource_mips); |
36 | |||
37 | return 0; | ||
33 | } | 38 | } |