aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/interface.c
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2009-01-06 17:42:12 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 18:59:24 -0500
commit5d2a50371ddf127afa782ad3147469be8e9bd69f (patch)
treebc7b7032512c17f493e5f656044c79c17952f517 /drivers/rtc/interface.c
parent2fac6674ddf3164da42a76d62f8912073d629a30 (diff)
rtc: move power of 2 periodic frequency check down into drivers
Move the power of 2 check on frequencies down into individual rtc drivers This is to allow for non power of 2 real time clock periodic interrupts such as those on the pxa27x to be found in the new pxa27x-rtc driver Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/interface.c')
-rw-r--r--drivers/rtc/interface.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 43276f29d636..50482d1321e8 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -504,9 +504,6 @@ int rtc_irq_set_freq(struct rtc_device *rtc, struct rtc_task *task, int freq)
504 if (rtc->ops->irq_set_freq == NULL) 504 if (rtc->ops->irq_set_freq == NULL)
505 return -ENXIO; 505 return -ENXIO;
506 506
507 if (!is_power_of_2(freq))
508 return -EINVAL;
509
510 spin_lock_irqsave(&rtc->irq_task_lock, flags); 507 spin_lock_irqsave(&rtc->irq_task_lock, flags);
511 if (rtc->irq_task != NULL && task == NULL) 508 if (rtc->irq_task != NULL && task == NULL)
512 err = -EBUSY; 509 err = -EBUSY;