From: Roman Fietze Date: Wed, 11 Aug 2010 01:02:21 +0000 (-0700) Subject: rtc-isl12022: properly handle military hour format X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6d23b2582fd0bc0a8cf3cfa4307f66281cacad4b;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git rtc-isl12022: properly handle military hour format Mask out PM flag when reading the hour, always set MIL bit when writing the hour. Signed-off-by: Roman Fietze Acked-by: Wan ZongShun Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-isl12022.c b/drivers/rtc/rtc-isl12022.c index 4a8c9dd12a7f..ddbc797ea6cd 100644 --- a/drivers/rtc/rtc-isl12022.c +++ b/drivers/rtc/rtc-isl12022.c @@ -208,7 +208,7 @@ static int isl12022_set_datetime(struct i2c_client *client, struct rtc_time *tm) /* hours, minutes and seconds */ buf[ISL12022_REG_SC] = bin2bcd(tm->tm_sec); buf[ISL12022_REG_MN] = bin2bcd(tm->tm_min); - buf[ISL12022_REG_HR] = bin2bcd(tm->tm_hour); + buf[ISL12022_REG_HR] = bin2bcd(tm->tm_hour) | ISL12022_HR_MIL; buf[ISL12022_REG_DT] = bin2bcd(tm->tm_mday);