Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263054
b: refs/heads/master
c: 6e7a333
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner authored and John Stultz committed Jul 26, 2011
1 parent 2a66e8e commit 5450178
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3c8bb90efb6e3105206e4aaa9127395feeda5492
refs/heads/master: 6e7a333eaa522ef73be01caec7a01521490aaf00
2 changes: 1 addition & 1 deletion trunk/drivers/rtc/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ int rtc_irq_set_freq(struct rtc_device *rtc, struct rtc_task *task, int freq)
int err = 0;
unsigned long flags;

if (freq <= 0)
if (freq <= 0 || freq > RTC_MAX_FREQ)
return -EINVAL;
retry:
spin_lock_irqsave(&rtc->irq_task_lock, flags);
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/linux/rtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ struct rtc_pll_info {
#define RTC_AF 0x20 /* Alarm interrupt */
#define RTC_UF 0x10 /* Update interrupt for 1Hz RTC */


#define RTC_MAX_FREQ 8192

#ifdef __KERNEL__

#include <linux/types.h>
Expand Down

0 comments on commit 5450178

Please sign in to comment.