From: Jean Delvare <khali@linux-fr.org>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
LM Sensors <sensors@Stimpy.netroedge.com>
Subject: [PATCH 2.4] I2C updates for 2.4.31-pre1 (3/3)
Date: Sun, 1 May 2005 20:03:40 +0200 [thread overview]
Message-ID: <20050501200340.51c339f2.khali@linux-fr.org> (raw)
In-Reply-To: <20050501185236.2f76a5ba.khali@linux-fr.org>
Fix an iteration bug in the handling of i2c client module parameters.
The "force" module parameter is a list of adapter, address pairs, not
triplets. The current code would only handle the first, fourth, seventh
etc. pairs properly. I guess that nobody ever needed more than one pair,
or the bug would have been noticed way earlier. This bug was originally
fixed by myself in Linux 2.6.
http://marc.theaimsgroup.com/?l=linux-kernel&m=111231616107325
http://linux.bkbits.net:8080/linux-2.5/diffs/drivers/i2c/i2c-core.c@1.66
--- linux-2.4.30-rc1/drivers/i2c/i2c-core.c.orig 2005-03-10 19:57:34.000000000 +0100
+++ linux-2.4.30-rc1/drivers/i2c/i2c-core.c 2005-03-27 19:09:46.000000000 +0200
@@ -851,7 +851,7 @@
at all */
found = 0;
- for (i = 0; !found && (address_data->force[i] != I2C_CLIENT_END); i += 3) {
+ for (i = 0; !found && (address_data->force[i] != I2C_CLIENT_END); i += 2) {
if (((adap_id == address_data->force[i]) ||
(address_data->force[i] == ANY_I2C_BUS)) &&
(addr == address_data->force[i+1])) {
--
Jean Delvare
prev parent reply other threads:[~2005-05-01 18:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-01 16:52 I2C updates for 2.4.31-pre1 Jean Delvare
2005-05-01 17:15 ` [PATCH 2.4] I2C updates for 2.4.31-pre1 (1/3) Jean Delvare
2005-05-01 17:50 ` [PATCH 2.4] I2C updates for 2.4.31-pre1 (2/3) Jean Delvare
2005-05-01 18:03 ` Jean Delvare [this message]
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=20050501200340.51c339f2.khali@linux-fr.org \
--to=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=sensors@Stimpy.netroedge.com \
/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