Merge branch 'fixes-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
[sfrench/cifs-2.6.git] / drivers / rtc / rtc-ds1742.c
index 67291b0f82838a6e7214827b0706fdbf07096ae3..2e73f0b183b2fd94540cc6624c0d2281cfc72950 100644 (file)
@@ -160,10 +160,13 @@ static ssize_t ds1742_nvram_write(struct kobject *kobj,
 static struct bin_attribute ds1742_nvram_attr = {
        .attr = {
                .name = "nvram",
-               .mode = S_IRUGO | S_IWUGO,
+               .mode = S_IRUGO | S_IWUSR,
        },
        .read = ds1742_nvram_read,
        .write = ds1742_nvram_write,
+       /* REVISIT: size in sysfs won't match actual size... if it's
+        * not a constant, each RTC should have its own attribute.
+        */
 };
 
 static int __devinit ds1742_rtc_probe(struct platform_device *pdev)
@@ -251,7 +254,7 @@ static struct platform_driver ds1742_rtc_driver = {
        .probe          = ds1742_rtc_probe,
        .remove         = __devexit_p(ds1742_rtc_remove),
        .driver         = {
-               .name   = "ds1742",
+               .name   = "rtc-ds1742",
                .owner  = THIS_MODULE,
        },
 };