Skip to content

Commit

Permalink
[SPARC64]: Fix mini RTC driver reading.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller authored and David S. Miller committed Mar 20, 2006
1 parent 8bcd174 commit c4f8ef7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/sparc64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,8 @@ static inline void mini_get_rtc_time(struct rtc_time *time)
spin_unlock_irqrestore(&rtc_lock, flags);

to_tm(seconds, time);
time->tm_year -= 1900;
time->tm_mon -= 1;
}

static inline int mini_set_rtc_time(struct rtc_time *time)
Expand Down

0 comments on commit c4f8ef7

Please sign in to comment.