summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-lib.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2008-09-22 02:41:56 +0200
committerJames Morris <jmorris@namei.org>2008-09-22 02:41:56 +0200
commitab2b49518e743962f71b94246855c44ee9cf52cc (patch)
tree26b260a350f0a0a0d19b558bf147b812e3a1564c /drivers/rtc/rtc-lib.c
parentUpdate selinux info in MAINTAINERS and Kconfig help text (diff)
parentLinux 2.6.27-rc7 (diff)
downloadlinux-ab2b49518e743962f71b94246855c44ee9cf52cc.tar.xz
linux-ab2b49518e743962f71b94246855c44ee9cf52cc.zip
Merge branch 'master' into next
Conflicts: MAINTAINERS Thanks for breaking my tree :-) Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'drivers/rtc/rtc-lib.c')
-rw-r--r--drivers/rtc/rtc-lib.c5
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);
*/
void rtc_time_to_tm(unsigned long time, struct rtc_time *tm)
{
- unsigned int days, month, year;
+ unsigned int month, year;
+ int days;
days = time / 86400;
- time -= days * 86400;
+ time -= (unsigned int) days * 86400;
/* day of the week, 1970-01-01 was a Thursday */
tm->tm_wday = (days + 4) % 7;