[SPARC64]: Fix mini RTC driver reading.
Need to subtract 1900 from year and 1 from month before giving it back to userspace. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
8bcd174116
commit
c4f8ef77f9
@@ -1363,6 +1363,8 @@ static inline void mini_get_rtc_time(struct rtc_time *time)
|
|||||||
spin_unlock_irqrestore(&rtc_lock, flags);
|
spin_unlock_irqrestore(&rtc_lock, flags);
|
||||||
|
|
||||||
to_tm(seconds, time);
|
to_tm(seconds, time);
|
||||||
|
time->tm_year -= 1900;
|
||||||
|
time->tm_mon -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int mini_set_rtc_time(struct rtc_time *time)
|
static inline int mini_set_rtc_time(struct rtc_time *time)
|
||||||
|
Reference in New Issue
Block a user