diff options
Diffstat (limited to 'drivers/rtc/rtc-sh.c')
-rw-r--r-- | drivers/rtc/rtc-sh.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index 5ed66acf8ca5..1c3fc6b428e9 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/log2.h> | ||
27 | #include <asm/rtc.h> | 28 | #include <asm/rtc.h> |
28 | 29 | ||
29 | #define DRV_NAME "sh-rtc" | 30 | #define DRV_NAME "sh-rtc" |
@@ -551,6 +552,8 @@ static int sh_rtc_irq_set_state(struct device *dev, int enabled) | |||
551 | 552 | ||
552 | static int sh_rtc_irq_set_freq(struct device *dev, int freq) | 553 | static int sh_rtc_irq_set_freq(struct device *dev, int freq) |
553 | { | 554 | { |
555 | if (!is_power_of_2(freq)) | ||
556 | return -EINVAL; | ||
554 | return sh_rtc_ioctl(dev, RTC_IRQP_SET, freq); | 557 | return sh_rtc_ioctl(dev, RTC_IRQP_SET, freq); |
555 | } | 558 | } |
556 | 559 | ||