diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-09-05 11:53:05 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-09-05 11:53:05 -0400 |
| commit | 28c3cfd5fb998bd3683bebeebbba38baa2101cad (patch) | |
| tree | 3d325023e6dc56baa6c69fc59dd55bf37ef7967e /drivers/rtc/rtc-lib.c | |
| parent | 04197c83b3e05546d1003cfa3ff43f1639c0057f (diff) | |
| parent | b380b0d4f7dffcc235c0facefa537d4655619101 (diff) | |
Merge branch 'linus' into x86/tracehook
Diffstat (limited to 'drivers/rtc/rtc-lib.c')
| -rw-r--r-- | drivers/rtc/rtc-lib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-lib.c b/drivers/rtc/rtc-lib.c index 9f996ec881ce..dd70bf73ce9d 100644 --- a/drivers/rtc/rtc-lib.c +++ b/drivers/rtc/rtc-lib.c | |||
| @@ -51,10 +51,11 @@ EXPORT_SYMBOL(rtc_year_days); | |||
| 51 | */ | 51 | */ |
| 52 | void rtc_time_to_tm(unsigned long time, struct rtc_time *tm) | 52 | void rtc_time_to_tm(unsigned long time, struct rtc_time *tm) |
| 53 | { | 53 | { |
| 54 | unsigned int days, month, year; | 54 | unsigned int month, year; |
| 55 | int days; | ||
| 55 | 56 | ||
| 56 | days = time / 86400; | 57 | days = time / 86400; |
| 57 | time -= days * 86400; | 58 | time -= (unsigned int) days * 86400; |
| 58 | 59 | ||
| 59 | /* day of the week, 1970-01-01 was a Thursday */ | 60 | /* day of the week, 1970-01-01 was a Thursday */ |
| 60 | tm->tm_wday = (days + 4) % 7; | 61 | tm->tm_wday = (days + 4) % 7; |
