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/[email protected]
--- 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]