]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/rtc/rtc-s3c.c
OMAP3: clock: Camera module doesn't have IDLEST bit
[linux-2.6-omap-h63xx.git] / drivers / rtc / rtc-s3c.c
index 7a568beba3f00b95f483664b03d888fc76059877..e0d7b9991505564c412e4771f8061154c5adc449 100644 (file)
@@ -94,6 +94,9 @@ static int s3c_rtc_setfreq(struct device *dev, int freq)
 {
        unsigned int tmp;
 
+       if (!is_power_of_2(freq))
+               return -EINVAL;
+
        spin_lock_irq(&s3c_rtc_pie_lock);
 
        tmp = readb(s3c_rtc_base + S3C2410_TICNT) & S3C2410_TICNT_ENABLE;