diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-07-22 05:12:51 -0400 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2011-07-26 17:50:01 -0400 |
commit | 6e7a333eaa522ef73be01caec7a01521490aaf00 (patch) | |
tree | 76e9ffac58da9bc22327a38ea5e40fc5aa18c530 /drivers/rtc | |
parent | 3c8bb90efb6e3105206e4aaa9127395feeda5492 (diff) |
rtc: Limit RTC PIE frequency
The RTC pie hrtimer is self rearming. We really need to limit the
frequency to something sensible. Thus limit it to the 8192Hz max
value from the rtc man documentation
Cc: Willy Tarreau <w@1wt.eu>
Cc: stable@kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[jstultz: slightly reworked to use RTC_MAX_FREQ value]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index a1ba2caa8308..44e91e598f8d 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c | |||
@@ -708,7 +708,7 @@ int rtc_irq_set_freq(struct rtc_device *rtc, struct rtc_task *task, int freq) | |||
708 | int err = 0; | 708 | int err = 0; |
709 | unsigned long flags; | 709 | unsigned long flags; |
710 | 710 | ||
711 | if (freq <= 0) | 711 | if (freq <= 0 || freq > RTC_MAX_FREQ) |
712 | return -EINVAL; | 712 | return -EINVAL; |
713 | retry: | 713 | retry: |
714 | spin_lock_irqsave(&rtc->irq_task_lock, flags); | 714 | spin_lock_irqsave(&rtc->irq_task_lock, flags); |