diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-06 12:00:33 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-06 12:00:33 -0500 |
commit | 3d14b5beba35250c548d3851a2b84fce742d8311 (patch) | |
tree | 065e3d93c3fcbc5ee4c44fa78662393cddbdf6de /drivers/rtc | |
parent | 0719dc341389882cc834ed18fc9b7fc6006b2b85 (diff) | |
parent | 1bf8e6219552d5dd27012d567ec8c4bb9c2d86b4 (diff) |
Merge branch 'sa1100' into devel
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-pcf50633.c | 3 | ||||
-rw-r--r-- | drivers/rtc/rtc-x1205.c | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-pcf50633.c b/drivers/rtc/rtc-pcf50633.c index 33a10c47260e..4c5d5d0c4cfc 100644 --- a/drivers/rtc/rtc-pcf50633.c +++ b/drivers/rtc/rtc-pcf50633.c | |||
@@ -292,8 +292,9 @@ static int __devinit pcf50633_rtc_probe(struct platform_device *pdev) | |||
292 | &pcf50633_rtc_ops, THIS_MODULE); | 292 | &pcf50633_rtc_ops, THIS_MODULE); |
293 | 293 | ||
294 | if (IS_ERR(rtc->rtc_dev)) { | 294 | if (IS_ERR(rtc->rtc_dev)) { |
295 | int ret = PTR_ERR(rtc->rtc_dev); | ||
295 | kfree(rtc); | 296 | kfree(rtc); |
296 | return PTR_ERR(rtc->rtc_dev); | 297 | return ret; |
297 | } | 298 | } |
298 | 299 | ||
299 | pcf50633_register_irq(rtc->pcf, PCF50633_IRQ_ALARM, | 300 | pcf50633_register_irq(rtc->pcf, PCF50633_IRQ_ALARM, |
diff --git a/drivers/rtc/rtc-x1205.c b/drivers/rtc/rtc-x1205.c index 310c10795e9a..6583c1a8b070 100644 --- a/drivers/rtc/rtc-x1205.c +++ b/drivers/rtc/rtc-x1205.c | |||
@@ -195,7 +195,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm, | |||
195 | /* year, since the rtc epoch*/ | 195 | /* year, since the rtc epoch*/ |
196 | buf[CCR_YEAR] = bin2bcd(tm->tm_year % 100); | 196 | buf[CCR_YEAR] = bin2bcd(tm->tm_year % 100); |
197 | buf[CCR_WDAY] = tm->tm_wday & 0x07; | 197 | buf[CCR_WDAY] = tm->tm_wday & 0x07; |
198 | buf[CCR_Y2K] = bin2bcd(tm->tm_year / 100); | 198 | buf[CCR_Y2K] = bin2bcd((tm->tm_year + 1900) / 100); |
199 | } | 199 | } |
200 | 200 | ||
201 | /* If writing alarm registers, set compare bits on registers 0-4 */ | 201 | /* If writing alarm registers, set compare bits on registers 0-4 */ |
@@ -280,9 +280,9 @@ static int x1205_fix_osc(struct i2c_client *client) | |||
280 | int err; | 280 | int err; |
281 | struct rtc_time tm; | 281 | struct rtc_time tm; |
282 | 282 | ||
283 | tm.tm_hour = tm.tm_min = tm.tm_sec = 0; | 283 | memset(&tm, 0, sizeof(tm)); |
284 | 284 | ||
285 | err = x1205_set_datetime(client, &tm, 0, X1205_CCR_BASE, 0); | 285 | err = x1205_set_datetime(client, &tm, 1, X1205_CCR_BASE, 0); |
286 | if (err < 0) | 286 | if (err < 0) |
287 | dev_err(&client->dev, "unable to restart the oscillator\n"); | 287 | dev_err(&client->dev, "unable to restart the oscillator\n"); |
288 | 288 | ||