diff options
Diffstat (limited to 'drivers/rtc/rtc-pcf2123.c')
-rw-r--r-- | drivers/rtc/rtc-pcf2123.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c index 836118795c0b..13e4df63974f 100644 --- a/drivers/rtc/rtc-pcf2123.c +++ b/drivers/rtc/rtc-pcf2123.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/rtc.h> | 43 | #include <linux/rtc.h> |
44 | #include <linux/spi/spi.h> | 44 | #include <linux/spi/spi.h> |
45 | #include <linux/module.h> | 45 | #include <linux/module.h> |
46 | #include <linux/sysfs.h> | ||
46 | 47 | ||
47 | #define DRV_VERSION "0.6" | 48 | #define DRV_VERSION "0.6" |
48 | 49 | ||
@@ -292,6 +293,7 @@ static int __devinit pcf2123_probe(struct spi_device *spi) | |||
292 | pdata->rtc = rtc; | 293 | pdata->rtc = rtc; |
293 | 294 | ||
294 | for (i = 0; i < 16; i++) { | 295 | for (i = 0; i < 16; i++) { |
296 | sysfs_attr_init(&pdata->regs[i].attr.attr); | ||
295 | sprintf(pdata->regs[i].name, "%1x", i); | 297 | sprintf(pdata->regs[i].name, "%1x", i); |
296 | pdata->regs[i].attr.attr.mode = S_IRUGO | S_IWUSR; | 298 | pdata->regs[i].attr.attr.mode = S_IRUGO | S_IWUSR; |
297 | pdata->regs[i].attr.attr.name = pdata->regs[i].name; | 299 | pdata->regs[i].attr.attr.name = pdata->regs[i].name; |