]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/rtc/rtc-m48t59.c
rtc: fix platform driver hotplug/coldplug
[linux-2.6-omap-h63xx.git] / drivers / rtc / rtc-m48t59.c
index 2bad1637330a8cdb9258e481ffa031c8492defba..013e6c103b9c465f1cc66eabe1d3011e697b5704 100644 (file)
@@ -353,11 +353,12 @@ static ssize_t m48t59_nvram_write(struct kobject *kobj,
 static struct bin_attribute m48t59_nvram_attr = {
        .attr = {
                .name = "nvram",
-               .mode = S_IRUGO | S_IWUGO,
+               .mode = S_IRUGO | S_IWUSR,
                .owner = THIS_MODULE,
        },
        .read = m48t59_nvram_read,
        .write = m48t59_nvram_write,
+       .size = M48T59_NVRAM_SIZE,
 };
 
 static int __devinit m48t59_rtc_probe(struct platform_device *pdev)
@@ -464,6 +465,9 @@ static int __devexit m48t59_rtc_remove(struct platform_device *pdev)
        return 0;
 }
 
+/* work with hotplug and coldplug */
+MODULE_ALIAS("platform:rtc-m48t59");
+
 static struct platform_driver m48t59_rtc_driver = {
        .driver         = {
                .name   = "rtc-m48t59",