Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Fix RTC going backwards a year when saving time, ...
details: https://anonhg.NetBSD.org/src/rev/d5f1fd0d8fe9
branches: trunk
changeset: 325083:d5f1fd0d8fe9
user: rkujawa <rkujawa%NetBSD.org@localhost>
date: Wed Dec 04 07:48:59 2013 +0000
description:
Fix RTC going backwards a year when saving time, because dt_mon != dt_year.
Patch by Roc Valles.
diffstat:
sys/dev/ic/msm6242b.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 828ceca49fc3 -r d5f1fd0d8fe9 sys/dev/ic/msm6242b.c
--- a/sys/dev/ic/msm6242b.c Wed Dec 04 02:12:01 2013 +0000
+++ b/sys/dev/ic/msm6242b.c Wed Dec 04 07:48:59 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msm6242b.c,v 1.2 2012/11/14 17:15:25 rkujawa Exp $ */
+/* $NetBSD: msm6242b.c,v 1.3 2013/12/04 07:48:59 rkujawa Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msm6242b.c,v 1.2 2012/11/14 17:15:25 rkujawa Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msm6242b.c,v 1.3 2013/12/04 07:48:59 rkujawa Exp $");
/*
* Driver for OKI MSM6242B Real Time Clock. Somewhat based on an ancient, amiga
@@ -243,8 +243,8 @@
msm6242b_write(sc, MSM6242B_1DAY, dt->dt_day % 10);
msm6242b_write(sc, MSM6242B_10MONTH, dt->dt_mon / 10);
msm6242b_write(sc, MSM6242B_1MONTH, dt->dt_mon % 10);
- msm6242b_write(sc, MSM6242B_10YEAR, (dt->dt_mon / 10) % 10);
- msm6242b_write(sc, MSM6242B_1YEAR, dt->dt_mon % 10);
+ msm6242b_write(sc, MSM6242B_10YEAR, (dt->dt_year / 10) % 10);
+ msm6242b_write(sc, MSM6242B_1YEAR, dt->dt_year % 10);
msm6242b_write(sc, MSM6242B_WEEK, dt->dt_wday);
msm6242b_free(sc);
Home |
Main Index |
Thread Index |
Old Index