diff options
| author | Steven Whitehouse <swhiteho@redhat.com> | 2006-10-02 08:45:08 -0400 |
|---|---|---|
| committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-10-02 08:45:08 -0400 |
| commit | 59458f40e25915a355d8b1d701425fe9f4f9ea23 (patch) | |
| tree | f1c9a2934df686e36d75f759ab7313b6f0e0e5f9 /drivers/rtc/rtc-ds1553.c | |
| parent | 825f9075d74028d11d7f5932f04e1b5db3022b51 (diff) | |
| parent | d834c16516d1ebec4766fc58c059bf01311e6045 (diff) | |
Merge branch 'master' into gfs2
Diffstat (limited to 'drivers/rtc/rtc-ds1553.c')
| -rw-r--r-- | drivers/rtc/rtc-ds1553.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c index 209001495474..9647188fee2c 100644 --- a/drivers/rtc/rtc-ds1553.c +++ b/drivers/rtc/rtc-ds1553.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
| 19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
| 20 | 20 | ||
| 21 | #define DRV_VERSION "0.1" | 21 | #define DRV_VERSION "0.2" |
| 22 | 22 | ||
| 23 | #define RTC_REG_SIZE 0x2000 | 23 | #define RTC_REG_SIZE 0x2000 |
| 24 | #define RTC_OFFSET 0x1ff0 | 24 | #define RTC_OFFSET 0x1ff0 |
| @@ -250,7 +250,7 @@ static int ds1553_rtc_ioctl(struct device *dev, unsigned int cmd, | |||
| 250 | return 0; | 250 | return 0; |
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | static struct rtc_class_ops ds1553_rtc_ops = { | 253 | static const struct rtc_class_ops ds1553_rtc_ops = { |
| 254 | .read_time = ds1553_rtc_read_time, | 254 | .read_time = ds1553_rtc_read_time, |
| 255 | .set_time = ds1553_rtc_set_time, | 255 | .set_time = ds1553_rtc_set_time, |
| 256 | .read_alarm = ds1553_rtc_read_alarm, | 256 | .read_alarm = ds1553_rtc_read_alarm, |
| @@ -357,9 +357,13 @@ static int __init ds1553_rtc_probe(struct platform_device *pdev) | |||
| 357 | pdata->rtc = rtc; | 357 | pdata->rtc = rtc; |
| 358 | pdata->last_jiffies = jiffies; | 358 | pdata->last_jiffies = jiffies; |
| 359 | platform_set_drvdata(pdev, pdata); | 359 | platform_set_drvdata(pdev, pdata); |
| 360 | sysfs_create_bin_file(&pdev->dev.kobj, &ds1553_nvram_attr); | 360 | ret = sysfs_create_bin_file(&pdev->dev.kobj, &ds1553_nvram_attr); |
| 361 | if (ret) | ||
| 362 | goto out; | ||
| 361 | return 0; | 363 | return 0; |
| 362 | out: | 364 | out: |
| 365 | if (pdata->rtc) | ||
| 366 | rtc_device_unregister(pdata->rtc); | ||
| 363 | if (pdata->irq >= 0) | 367 | if (pdata->irq >= 0) |
| 364 | free_irq(pdata->irq, pdev); | 368 | free_irq(pdata->irq, pdev); |
| 365 | if (ioaddr) | 369 | if (ioaddr) |
