aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ds1553.c
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2006-10-01 02:28:18 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 03:39:25 -0400
commit391b1fe67d193df75144a92b146613c36491ef0d (patch)
treeea455c0b5b2ed29cf11a33ffecc85d58851d2ab7 /drivers/rtc/rtc-ds1553.c
parent90b4d648f02a653b192be7f0feb0a933b7525e6a (diff)
[PATCH] RTC: rtc-ds1553, rtc-ds1742 update
Check return value of sysfs_create_bin_file(). Fix polarity of RTC_BATT_FLAG bit in DS1742. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/rtc/rtc-ds1553.c')
-rw-r--r--drivers/rtc/rtc-ds1553.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c
index 4fc9422ed86d..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
@@ -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)