Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81ffbc04 authored by Philippe De Muyter's avatar Philippe De Muyter Committed by Jean Delvare
Browse files

i2c/m41t00: Do not forget to write year



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

Signed-off-by: default avatarPhilippe De Muyter <phdm@macqel.be>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Acked-by: default avatarMark A. Greer <mgreer@mvista.com>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 3269bb63
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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");