X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Frtc%2Frtc-m48t59.c;h=013e6c103b9c465f1cc66eabe1d3011e697b5704;hb=66d715c95a39e84cd25204a665915621457d9691;hp=33b752350ab5c91b708eda96cbff4df7b5d53f2c;hpb=2fe83b3ad12d43799af5f3156886eca443a88bac;p=linux-2.6 diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c index 33b752350a..013e6c103b 100644 --- a/drivers/rtc/rtc-m48t59.c +++ b/drivers/rtc/rtc-m48t59.c @@ -35,7 +35,7 @@ struct m48t59_private { void __iomem *ioaddr; unsigned int size; /* iomem size */ - unsigned int irq; + int irq; struct rtc_device *rtc; spinlock_t lock; /* serialize the NVRAM and RTC access */ }; @@ -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,7 +465,10 @@ static int __devexit m48t59_rtc_remove(struct platform_device *pdev) return 0; } -static struct platform_driver m48t59_rtc_platdrv = { +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:rtc-m48t59"); + +static struct platform_driver m48t59_rtc_driver = { .driver = { .name = "rtc-m48t59", .owner = THIS_MODULE, @@ -475,12 +479,12 @@ static struct platform_driver m48t59_rtc_platdrv = { static int __init m48t59_rtc_init(void) { - return platform_driver_register(&m48t59_rtc_platdrv); + return platform_driver_register(&m48t59_rtc_driver); } static void __exit m48t59_rtc_exit(void) { - platform_driver_unregister(&m48t59_rtc_platdrv); + platform_driver_unregister(&m48t59_rtc_driver); } module_init(m48t59_rtc_init);