[patch 02/59] i2c/m41t00: Do not forget to write year

Chris Wright
2007-02-03T02:37:16Z

[-- Attachment #1: i2c-m41t00-do-not-forget-to-write-year.patch --]
[-- Type: text/plain, Size: 1126 bytes --]

-stable review patch. If anyone has any objections, please let us know.
------------------

From: Philippe De Muyter <phdm@macqel.be>

m41t00.c forgets to set the year field in set_rtc_time; fix that.

Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
Merged in 2.6.20-rc4:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=81ffbc04a8ea06c4bea534154f49ed598013ee6b

drivers/i2c/chips/m41t00.c | 1 +
1 file changed, 1 insertion(+)

--- linux-2.6.19.2.orig/drivers/i2c/chips/m41t00.c
+++ linux-2.6.19.2/drivers/i2c/chips/m41t00.c
@@ -209,6 +209,7 @@ m41t00_set(void *arg)
buf[m41t00_chip->hour] = (buf[m41t00_chip->hour] & ~0x3f) | (hour& 0x3f);
buf[m41t00_chip->day] = (buf[m41t00_chip->day] & ~0x3f) | (day & 0x3f);
buf[m41t00_chip->mon] = (buf[m41t00_chip->mon] & ~0x1f) | (mon & 0x1f);
+ buf[m41t00_chip->year] = year;

if (i2c_master_send(save_client, wbuf, 9) < 0)
dev_err(&save_client->dev, "m41t00_set: Write error\n");

--