diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-21 09:22:45 +0100 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-21 09:22:45 +0100 |
| commit | 14764b01a5576ce23a9d0c95a027049206a19cef (patch) | |
| tree | fa7f4e3b9b62598076baf7d312dd37d6c91b0d56 /drivers/rtc | |
| parent | fc4978b796e5e52ab3a709495a968199afe0a108 (diff) | |
| parent | 5ccd4302a20bfe56eb72a5e27ad0be046fc820a5 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nico/orion into devel-stable
Diffstat (limited to 'drivers/rtc')
| -rw-r--r-- | drivers/rtc/rtc-davinci.c | 1 | ||||
| -rw-r--r-- | drivers/rtc/rtc-ds1307.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-davinci.c b/drivers/rtc/rtc-davinci.c index 92a8f6cacda..34647fc1ee9 100644 --- a/drivers/rtc/rtc-davinci.c +++ b/drivers/rtc/rtc-davinci.c @@ -29,6 +29,7 @@ #include <linux/bcd.h> #include <linux/platform_device.h> #include <linux/io.h> +#include <linux/slab.h> /* * The DaVinci RTC is a simple RTC with the following diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index de033b7ac21..d827ce570a8 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -777,7 +777,7 @@ static int __devinit ds1307_probe(struct i2c_client *client, read_rtc: /* read RTC registers */ - tmp = ds1307->read_block_data(ds1307->client, 0, 8, buf); + tmp = ds1307->read_block_data(ds1307->client, ds1307->offset, 8, buf); if (tmp != 8) { pr_debug("read error %d\n", tmp); err = -EIO; @@ -862,7 +862,7 @@ read_rtc: if (ds1307->regs[DS1307_REG_HOUR] & DS1307_BIT_PM) tmp += 12; i2c_smbus_write_byte_data(client, - DS1307_REG_HOUR, + ds1307->offset + DS1307_REG_HOUR, bin2bcd(tmp)); } |
