diff options
author | Roman Fietze <roman.fietze@telemotive.de> | 2010-08-10 18:02:21 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-11 08:59:08 -0700 |
commit | 6d23b2582fd0bc0a8cf3cfa4307f66281cacad4b (patch) | |
tree | 0b722ad87f55a61755a4c523adc2808e9e6a9deb /drivers/rtc/rtc-isl12022.c | |
parent | c03675f05ff9039dbea4bbc5332a885921e36dff (diff) | |
download | linux-3.10-6d23b2582fd0bc0a8cf3cfa4307f66281cacad4b.tar.gz linux-3.10-6d23b2582fd0bc0a8cf3cfa4307f66281cacad4b.tar.bz2 linux-3.10-6d23b2582fd0bc0a8cf3cfa4307f66281cacad4b.zip |
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 <roman.fietze@telemotive.de>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-isl12022.c')
-rw-r--r-- | drivers/rtc/rtc-isl12022.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-isl12022.c b/drivers/rtc/rtc-isl12022.c index 4a8c9dd12a7..ddbc797ea6c 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); |