diff options
author | 2010-07-21 09:22:45 +0100 | |
---|---|---|
committer | 2010-07-21 09:22:45 +0100 | |
commit | 14764b01a5576ce23a9d0c95a027049206a19cef (patch) | |
tree | fa7f4e3b9b62598076baf7d312dd37d6c91b0d56 /drivers/rtc | |
parent | Merge git://git.linaro.org/nico/arm_security into devel-stable (diff) | |
parent | [ARM] Kirkwood: add missing machine targets to defconfig (diff) | |
download | wireguard-linux-14764b01a5576ce23a9d0c95a027049206a19cef.tar.xz wireguard-linux-14764b01a5576ce23a9d0c95a027049206a19cef.zip |
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 92a8f6cacda9..34647fc1ee98 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 de033b7ac21f..d827ce570a8c 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)); } |