mfd: Add twl6030 regulator subdevices
[safe/jmp/linux-2.6] / drivers / rtc / rtc-s3c.c
index 0273ebc..e0d7b99 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;
@@ -455,6 +458,8 @@ static int __devinit s3c_rtc_probe(struct platform_device *pdev)
 
        s3c_rtc_setfreq(&pdev->dev, 1);
 
+       device_init_wakeup(&pdev->dev, 1);
+
        /* register RTC and exit */
 
        rtc = rtc_device_register("s3c", &pdev->dev, &s3c_rtcops,
@@ -507,7 +512,7 @@ static int s3c_rtc_resume(struct platform_device *pdev)
 #define s3c_rtc_resume  NULL
 #endif
 
-static struct platform_driver s3c2410_rtcdrv = {
+static struct platform_driver s3c2410_rtc_driver = {
        .probe          = s3c_rtc_probe,
        .remove         = __devexit_p(s3c_rtc_remove),
        .suspend        = s3c_rtc_suspend,
@@ -523,12 +528,12 @@ static char __initdata banner[] = "S3C24XX RTC, (c) 2004,2006 Simtec Electronics
 static int __init s3c_rtc_init(void)
 {
        printk(banner);
-       return platform_driver_register(&s3c2410_rtcdrv);
+       return platform_driver_register(&s3c2410_rtc_driver);
 }
 
 static void __exit s3c_rtc_exit(void)
 {
-       platform_driver_unregister(&s3c2410_rtcdrv);
+       platform_driver_unregister(&s3c2410_rtc_driver);
 }
 
 module_init(s3c_rtc_init);