diff options
| author | James Morris <james.l.morris@oracle.com> | 2012-09-28 13:37:32 +1000 | 
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2012-09-28 13:37:32 +1000 | 
| commit | bf5308344527d015ac9a6d2bda4ad4d40fd7d943 (patch) | |
| tree | 566e61e2cfc648c374d15cfc8c661b73e1a471f8 /drivers/rtc/rtc-rs5c348.c | |
| parent | 3585e96cd1049682b8a19a0b699422156e9d735b (diff) | |
| parent | 979570e02981d4a8fc20b3cc8fd651856c98ee9d (diff) | |
| download | olio-linux-3.10-bf5308344527d015ac9a6d2bda4ad4d40fd7d943.tar.xz olio-linux-3.10-bf5308344527d015ac9a6d2bda4ad4d40fd7d943.zip  | |
Merge tag 'v3.6-rc7' into next
Linux 3.6-rc7
Requested by David Howells so he can merge his key susbsystem work into
my tree with requisite -linus changesets.
Diffstat (limited to 'drivers/rtc/rtc-rs5c348.c')
| -rw-r--r-- | drivers/rtc/rtc-rs5c348.c | 7 | 
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-rs5c348.c b/drivers/rtc/rtc-rs5c348.c index 77074ccd285..fd5c7af04ae 100644 --- a/drivers/rtc/rtc-rs5c348.c +++ b/drivers/rtc/rtc-rs5c348.c @@ -122,9 +122,12 @@ rs5c348_rtc_read_time(struct device *dev, struct rtc_time *tm)  	tm->tm_min = bcd2bin(rxbuf[RS5C348_REG_MINS] & RS5C348_MINS_MASK);  	tm->tm_hour = bcd2bin(rxbuf[RS5C348_REG_HOURS] & RS5C348_HOURS_MASK);  	if (!pdata->rtc_24h) { -		tm->tm_hour %= 12; -		if (rxbuf[RS5C348_REG_HOURS] & RS5C348_BIT_PM) +		if (rxbuf[RS5C348_REG_HOURS] & RS5C348_BIT_PM) { +			tm->tm_hour -= 20; +			tm->tm_hour %= 12;  			tm->tm_hour += 12; +		} else +			tm->tm_hour %= 12;  	}  	tm->tm_wday = bcd2bin(rxbuf[RS5C348_REG_WDAY] & RS5C348_WDAY_MASK);  	tm->tm_mday = bcd2bin(rxbuf[RS5C348_REG_DAY] & RS5C348_DAY_MASK);  |