X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Frtc%2Frtc-stk17ta8.c;h=31d3c8c28588b9f272104aadd83df86512da2200;hb=84df87b7ebdcbbc0f59df9526f4e63fda70647d3;hp=f10d3facecbeb16e7be17189dbe3835619b293a3;hpb=39fe5434cb9de5da40510028b17b96bc4eb312b3;p=linux-2.6 diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c index f10d3facec..31d3c8c285 100644 --- a/drivers/rtc/rtc-stk17ta8.c +++ b/drivers/rtc/rtc-stk17ta8.c @@ -258,7 +258,8 @@ static const struct rtc_class_ops stk17ta8_rtc_ops = { .ioctl = stk17ta8_rtc_ioctl, }; -static ssize_t stk17ta8_nvram_read(struct kobject *kobj, char *buf, +static ssize_t stk17ta8_nvram_read(struct kobject *kobj, + struct bin_attribute *attr, char *buf, loff_t pos, size_t size) { struct platform_device *pdev = @@ -272,7 +273,8 @@ static ssize_t stk17ta8_nvram_read(struct kobject *kobj, char *buf, return count; } -static ssize_t stk17ta8_nvram_write(struct kobject *kobj, char *buf, +static ssize_t stk17ta8_nvram_write(struct kobject *kobj, + struct bin_attribute *attr, char *buf, loff_t pos, size_t size) { struct platform_device *pdev = @@ -289,7 +291,7 @@ static ssize_t stk17ta8_nvram_write(struct kobject *kobj, char *buf, static struct bin_attribute stk17ta8_nvram_attr = { .attr = { .name = "nvram", - .mode = S_IRUGO | S_IWUGO, + .mode = S_IRUGO | S_IWUSR, .owner = THIS_MODULE, }, .size = RTC_OFFSET, @@ -392,6 +394,9 @@ static int __devexit stk17ta8_rtc_remove(struct platform_device *pdev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:stk17ta8"); + static struct platform_driver stk17ta8_rtc_driver = { .probe = stk17ta8_rtc_probe, .remove = __devexit_p(stk17ta8_rtc_remove),