]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/rtc/rtc-s3c.c
Merge branch 'fix/hda' into topic/hda
[linux-2.6-omap-h63xx.git] / drivers / rtc / rtc-s3c.c
index f59277bbedaa2923a7b4f35127d9fdf9b3b3b309..e0d7b9991505564c412e4771f8061154c5adc449 100644 (file)
@@ -26,7 +26,7 @@
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-#include <asm/plat-s3c/regs-rtc.h>
+#include <plat/regs-rtc.h>
 
 /* I have yet to find an S3C implementation with more than one
  * of these rtc blocks in */
@@ -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;