diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-17 13:28:33 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-17 13:28:33 -0400 |
| commit | 6cac95296034bed7b2716d5f4e417a26a618da94 (patch) | |
| tree | 1a405f211c64f20359e42b3783d0487647da9822 | |
| parent | 2da9f365fc401b79627bc7be56d8a2b4ee9b390b (diff) | |
| parent | 6e7a333eaa522ef73be01caec7a01521490aaf00 (diff) | |
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
rtc: Limit RTC PIE frequency
rtc: Fix hrtimer deadlock
rtc: Handle errors correctly in rtc_irq_set_state()
Fixup trivial conflicts in drivers/rtc/interface.c due to slightly
trivially versions of the same patch coming in two different ways.
| -rw-r--r-- | drivers/rtc/interface.c | 4 | ||||
| -rw-r--r-- | include/linux/rtc.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 3195dbd3ec34..44e91e598f8d 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c | |||
| @@ -639,7 +639,7 @@ EXPORT_SYMBOL_GPL(rtc_irq_unregister); | |||
| 639 | static int rtc_update_hrtimer(struct rtc_device *rtc, int enabled) | 639 | static int rtc_update_hrtimer(struct rtc_device *rtc, int enabled) |
| 640 | { | 640 | { |
| 641 | /* | 641 | /* |
| 642 | * We unconditionally cancel the timer here, because otherwise | 642 | * We always cancel the timer here first, because otherwise |
| 643 | * we could run into BUG_ON(timer->state != HRTIMER_STATE_CALLBACK); | 643 | * we could run into BUG_ON(timer->state != HRTIMER_STATE_CALLBACK); |
| 644 | * when we manage to start the timer before the callback | 644 | * when we manage to start the timer before the callback |
| 645 | * returns HRTIMER_RESTART. | 645 | * returns HRTIMER_RESTART. |
| @@ -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 || freq > 5000) | 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); |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index b27ebea25660..93f4d035076b 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
| @@ -97,6 +97,9 @@ struct rtc_pll_info { | |||
| 97 | #define RTC_AF 0x20 /* Alarm interrupt */ | 97 | #define RTC_AF 0x20 /* Alarm interrupt */ |
| 98 | #define RTC_UF 0x10 /* Update interrupt for 1Hz RTC */ | 98 | #define RTC_UF 0x10 /* Update interrupt for 1Hz RTC */ |
| 99 | 99 | ||
| 100 | |||
| 101 | #define RTC_MAX_FREQ 8192 | ||
| 102 | |||
| 100 | #ifdef __KERNEL__ | 103 | #ifdef __KERNEL__ |
| 101 | 104 | ||
| 102 | #include <linux/types.h> | 105 | #include <linux/types.h> |
