]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/rtc/rtc-ds1553.c
sky2: Fix WOL regression
[linux-2.6-omap-h63xx.git] / drivers / rtc / rtc-ds1553.c
index afa64c7fa2e2d67152b50fe75b011e7cf2c8a6f2..a19f1141554083058d5be71ac4064e81c97ac281 100644 (file)
@@ -61,7 +61,7 @@
 struct rtc_plat_data {
        struct rtc_device *rtc;
        void __iomem *ioaddr;
-       unsigned long baseaddr;
+       resource_size_t baseaddr;
        unsigned long last_jiffies;
        int irq;
        unsigned int irqen;
@@ -258,8 +258,9 @@ static const struct rtc_class_ops ds1553_rtc_ops = {
        .ioctl          = ds1553_rtc_ioctl,
 };
 
-static ssize_t ds1553_nvram_read(struct kobject *kobj, char *buf,
-                                loff_t pos, size_t size)
+static ssize_t ds1553_nvram_read(struct kobject *kobj,
+                                struct bin_attribute *bin_attr,
+                                char *buf, loff_t pos, size_t size)
 {
        struct platform_device *pdev =
                to_platform_device(container_of(kobj, struct device, kobj));
@@ -272,8 +273,9 @@ static ssize_t ds1553_nvram_read(struct kobject *kobj, char *buf,
        return count;
 }
 
-static ssize_t ds1553_nvram_write(struct kobject *kobj, char *buf,
-                                 loff_t pos, size_t size)
+static ssize_t ds1553_nvram_write(struct kobject *kobj,
+                                 struct bin_attribute *bin_attr,
+                                 char *buf, loff_t pos, size_t size)
 {
        struct platform_device *pdev =
                to_platform_device(container_of(kobj, struct device, kobj));
@@ -289,8 +291,7 @@ static ssize_t ds1553_nvram_write(struct kobject *kobj, char *buf,
 static struct bin_attribute ds1553_nvram_attr = {
        .attr = {
                .name = "nvram",
-               .mode = S_IRUGO | S_IWUGO,
-               .owner = THIS_MODULE,
+               .mode = S_IRUGO | S_IWUSR,
        },
        .size = RTC_OFFSET,
        .read = ds1553_nvram_read,
@@ -390,11 +391,14 @@ static int __devexit ds1553_rtc_remove(struct platform_device *pdev)
        return 0;
 }
 
+/* work with hotplug and coldplug */
+MODULE_ALIAS("platform:rtc-ds1553");
+
 static struct platform_driver ds1553_rtc_driver = {
        .probe          = ds1553_rtc_probe,
        .remove         = __devexit_p(ds1553_rtc_remove),
        .driver         = {
-               .name   = "ds1553",
+               .name   = "rtc-ds1553",
                .owner  = THIS_MODULE,
        },
 };
@@ -406,7 +410,7 @@ static __init int ds1553_init(void)
 
 static __exit void ds1553_exit(void)
 {
-       return platform_driver_unregister(&ds1553_rtc_driver);
+       platform_driver_unregister(&ds1553_rtc_driver);
 }
 
 module_init(ds1553_init);