From: James Chapman <jchapman@katalix.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Michael Burian <dynmail1@gassner-waagen.at>
Subject: [PATCH 2.6.14] i2c chips: ds1337 2/2
Date: Thu, 03 Nov 2005 20:23:43 +0000 [thread overview]
Message-ID: <436A71CF.5090309@katalix.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 417 bytes --]
Patch for ds1337 i2c driver:
Fix BCD value errors when month=9, moving the increment inside the
BIN2BCD macro.
Fix similar code for the weekday value, just for consistency.
This bug was reported by Michael Burian <dynmail1@gassner-waagen.at>.
Signed-off-by: James Chapman <jchapman@katalix.com>
--
James Chapman
Katalix Systems Ltd
http://www.katalix.com
Catalysts for your Embedded Linux software development
[-- Attachment #2: ds1337-bcd.patch --]
[-- Type: text/plain, Size: 901 bytes --]
Fix BCD value errors when month=9, moving the increment inside the
BIN2BCD macro.
Fix similar code for the weekday value, just for consistency.
This bug was reported by Michael Burian <dynmail1@gassner-waagen.at>.
Signed-off-by: James Chapman <jchapman@katalix.com>
Index: linux-2.6.14/drivers/i2c/chips/ds1337.c
===================================================================
--- linux-2.6.14.orig/drivers/i2c/chips/ds1337.c 2005-11-02 19:38:49.000000000 +0000
+++ linux-2.6.14/drivers/i2c/chips/ds1337.c 2005-11-02 19:38:58.000000000 +0000
@@ -177,9 +177,9 @@
buf[1] = BIN2BCD(dt->tm_sec);
buf[2] = BIN2BCD(dt->tm_min);
buf[3] = BIN2BCD(dt->tm_hour);
- buf[4] = BIN2BCD(dt->tm_wday) + 1;
+ buf[4] = BIN2BCD(dt->tm_wday + 1);
buf[5] = BIN2BCD(dt->tm_mday);
- buf[6] = BIN2BCD(dt->tm_mon) + 1;
+ buf[6] = BIN2BCD(dt->tm_mon + 1);
val = dt->tm_year;
if (val >= 100) {
val -= 100;
next reply other threads:[~2005-11-03 20:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-03 20:23 James Chapman [this message]
2005-11-05 8:01 ` [PATCH 2.6.14] i2c chips: ds1337 2/2 Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=436A71CF.5090309@katalix.com \
--to=jchapman@katalix.com \
--cc=dynmail1@gassner-waagen.at \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox