diff -Naur -X ../dontdiff linux-2.6.12-rc2/Documentation/i2c/writing-clients linux-2.6.12-rc2-i2c/Documentation/i2c/writing-clients --- linux-2.6.12-rc2/Documentation/i2c/writing-clients 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/Documentation/i2c/writing-clients 2005-04-09 08:57:16.000000000 -0700 @@ -171,45 +171,31 @@ normal_i2c: filled in by the module writer. A list of I2C addresses which should normally be examined. - normal_i2c_range: filled in by the module writer. - A list of pairs of I2C addresses, each pair being an inclusive range of - addresses which should normally be examined. probe: insmod parameter. A list of pairs. The first value is a bus number (-1 for any I2C bus), the second is the address. These addresses are also probed, as if they were in the 'normal' list. - probe_range: insmod parameter. - A list of triples. The first value is a bus number (-1 for any I2C bus), - the second and third are addresses. These form an inclusive range of - addresses that are also probed, as if they were in the 'normal' list. ignore: insmod parameter. A list of pairs. The first value is a bus number (-1 for any I2C bus), the second is the I2C address. These addresses are never probed. This parameter overrules 'normal' and 'probe', but not the 'force' lists. - ignore_range: insmod parameter. - A list of triples. The first value is a bus number (-1 for any I2C bus), - the second and third are addresses. These form an inclusive range of - I2C addresses that are never probed. - This parameter overrules 'normal' and 'probe', but not the 'force' lists. force: insmod parameter. A list of pairs. The first value is a bus number (-1 for any I2C bus), the second is the I2C address. A device is blindly assumed to be on the given address, no probing is done. -Fortunately, as a module writer, you just have to define the `normal' -and/or `normal_range' parameters. The complete declaration could look -like this: - - /* Scan 0x20 to 0x2f, 0x37, and 0x40 to 0x4f */ - static unsigned short normal_i2c[] = { 0x37,I2C_CLIENT_END }; - static unsigned short normal_i2c_range[] = { 0x20, 0x2f, 0x40, 0x4f, - I2C_CLIENT_END }; +Fortunately, as a module writer, you just have to define the `normal_i2c' +parameter. The complete declaration could look like this: + + /* Scan 0x37, and 0x48 to 0x4f */ + static unsigned short normal_i2c[] = { 0x37, 0x48, 0x49, 0x4a, 0x4b, 0x4c, + 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; /* Magic definition of all other variables and things */ I2C_CLIENT_INSMOD; -Note that you *have* to call the two defined variables `normal_i2c' and -`normal_i2c_range', without any prefix! +Note that you *have* to call the defined variable `normal_i2c', +without any prefix! Probing classes (sensors) @@ -223,39 +209,17 @@ normal_i2c: filled in by the module writer. Terminated by SENSORS_I2C_END. A list of I2C addresses which should normally be examined. - normal_i2c_range: filled in by the module writer. Terminated by - SENSORS_I2C_END - A list of pairs of I2C addresses, each pair being an inclusive range of - addresses which should normally be examined. normal_isa: filled in by the module writer. Terminated by SENSORS_ISA_END. A list of ISA addresses which should normally be examined. - normal_isa_range: filled in by the module writer. Terminated by - SENSORS_ISA_END - A list of triples. The first two elements are ISA addresses, being an - range of addresses which should normally be examined. The third is the - modulo parameter: only addresses which are 0 module this value relative - to the first address of the range are actually considered. probe: insmod parameter. Initialize this list with SENSORS_I2C_END values. A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for the ISA bus, -1 for any I2C bus), the second is the address. These addresses are also probed, as if they were in the 'normal' list. - probe_range: insmod parameter. Initialize this list with SENSORS_I2C_END - values. - A list of triples. The first value is a bus number (SENSORS_ISA_BUS for - the ISA bus, -1 for any I2C bus), the second and third are addresses. - These form an inclusive range of addresses that are also probed, as - if they were in the 'normal' list. ignore: insmod parameter. Initialize this list with SENSORS_I2C_END values. A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for the ISA bus, -1 for any I2C bus), the second is the I2C address. These addresses are never probed. This parameter overrules 'normal' and 'probe', but not the 'force' lists. - ignore_range: insmod parameter. Initialize this list with SENSORS_I2C_END - values. - A list of triples. The first value is a bus number (SENSORS_ISA_BUS for - the ISA bus, -1 for any I2C bus), the second and third are addresses. - These form an inclusive range of I2C addresses that are never probed. - This parameter overrules 'normal' and 'probe', but not the 'force' lists. Also used is a list of pointers to sensors_force_data structures: force_data: insmod parameters. A list, ending with an element of which @@ -269,16 +233,14 @@ So we have a generic insmod variabled `force', and chip-specific variables `force_CHIPNAME'. -Fortunately, as a module writer, you just have to define the `normal' -and/or `normal_range' parameters, and define what chip names are used. +Fortunately, as a module writer, you just have to define the `normal_i2c' +and `normal_isa' parameters, and define what chip names are used. The complete declaration could look like this: - /* Scan i2c addresses 0x20 to 0x2f, 0x37, and 0x40 to 0x4f - static unsigned short normal_i2c[] = {0x37,SENSORS_I2C_END}; - static unsigned short normal_i2c_range[] = {0x20,0x2f,0x40,0x4f, - SENSORS_I2C_END}; + /* Scan i2c addresses 0x37, and 0x48 to 0x4f */ + static unsigned short normal_i2c[] = { 0x37, 0x48, 0x49, 0x4a, 0x4b, 0x4c, + 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; /* Scan ISA address 0x290 */ static unsigned int normal_isa[] = {0x0290,SENSORS_ISA_END}; - static unsigned int normal_isa_range[] = {SENSORS_ISA_END}; /* Define chips foo and bar, as well as all module parameters and things */ SENSORS_INSMOD_2(foo,bar); diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/acorn/char/pcf8583.c linux-2.6.12-rc2-i2c/drivers/acorn/char/pcf8583.c --- linux-2.6.12-rc2/drivers/acorn/char/pcf8583.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/acorn/char/pcf8583.c 2005-04-09 08:57:16.000000000 -0700 @@ -26,11 +26,8 @@ static struct i2c_client_address_data addr_data = { .normal_i2c = normal_addr, - .normal_i2c_range = ignore, .probe = ignore, - .probe_range = ignore, .ignore = ignore, - .ignore_range = ignore, .force = ignore, }; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/i2c/chips/isp1301_omap.c linux-2.6.12-rc2-i2c/drivers/i2c/chips/isp1301_omap.c --- linux-2.6.12-rc2/drivers/i2c/chips/isp1301_omap.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/i2c/chips/isp1301_omap.c 2005-04-09 08:57:16.000000000 -0700 @@ -145,7 +145,6 @@ static unsigned short normal_i2c[] = { ISP_BASE, ISP_BASE + 1, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/i2c/chips/it87.c linux-2.6.12-rc2-i2c/drivers/i2c/chips/it87.c --- linux-2.6.12-rc2/drivers/i2c/chips/it87.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/i2c/chips/it87.c 2005-04-09 08:57:16.000000000 -0700 @@ -668,7 +668,7 @@ struct it87_data *data = it87_update_device(dev); return sprintf(buf,"%d\n", ALARMS_FROM_REG(data->alarms)); } -static DEVICE_ATTR(alarms, S_IRUGO | S_IWUSR, show_alarms, NULL); +static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); static ssize_t show_vrm_reg(struct device *dev, char *buf) diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/i2c/chips/m41t00.c linux-2.6.12-rc2-i2c/drivers/i2c/chips/m41t00.c --- linux-2.6.12-rc2/drivers/i2c/chips/m41t00.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/i2c/chips/m41t00.c 2005-04-09 08:57:16.000000000 -0700 @@ -40,11 +40,8 @@ static struct i2c_client_address_data addr_data = { .normal_i2c = normal_addr, - .normal_i2c_range = ignore, .probe = ignore, - .probe_range = ignore, .ignore = ignore, - .ignore_range = ignore, .force = ignore, }; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/i2c/chips/rtc8564.c linux-2.6.12-rc2-i2c/drivers/i2c/chips/rtc8564.c --- linux-2.6.12-rc2/drivers/i2c/chips/rtc8564.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/i2c/chips/rtc8564.c 2005-04-09 08:57:16.000000000 -0700 @@ -66,11 +66,8 @@ static struct i2c_client_address_data addr_data = { .normal_i2c = normal_addr, - .normal_i2c_range = ignore, .probe = ignore, - .probe_range = ignore, .ignore = ignore, - .ignore_range = ignore, .force = ignore, }; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/i2c/chips/via686a.c linux-2.6.12-rc2-i2c/drivers/i2c/chips/via686a.c --- linux-2.6.12-rc2/drivers/i2c/chips/via686a.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/i2c/chips/via686a.c 2005-04-09 08:57:16.000000000 -0700 @@ -574,7 +574,7 @@ struct via686a_data *data = via686a_update_device(dev); return sprintf(buf,"%d\n", ALARMS_FROM_REG(data->alarms)); } -static DEVICE_ATTR(alarms, S_IRUGO | S_IWUSR, show_alarms, NULL); +static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); /* The driver. I choose to use type i2c_driver, as at is identical to both smbus_driver and isa_driver, and clients could be of either kind */ @@ -651,10 +651,9 @@ new_client->adapter = adapter; new_client->driver = &via686a_driver; new_client->flags = 0; - new_client->dev.parent = &adapter->dev; /* Fill in the remaining client fields and put into the global list */ - snprintf(new_client->name, I2C_NAME_SIZE, client_name); + strlcpy(new_client->name, client_name, I2C_NAME_SIZE); data->valid = 0; init_MUTEX(&data->update_lock); diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/i2c/i2c-core.c linux-2.6.12-rc2-i2c/drivers/i2c/i2c-core.c --- linux-2.6.12-rc2/drivers/i2c/i2c-core.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/i2c/i2c-core.c 2005-04-09 08:57:16.000000000 -0700 @@ -742,18 +742,6 @@ found = 1; } } - for (i = 0; - !found && (address_data->ignore_range[i] != I2C_CLIENT_END); - i += 3) { - if (((adap_id == address_data->ignore_range[i]) || - ((address_data->ignore_range[i]==ANY_I2C_BUS))) && - (addr >= address_data->ignore_range[i+1]) && - (addr <= address_data->ignore_range[i+2])) { - dev_dbg(&adapter->dev, "found ignore_range parameter for adapter %d, " - "addr %04x\n", adap_id,addr); - found = 1; - } - } if (found) continue; @@ -770,17 +758,6 @@ } for (i = 0; - !found && (address_data->normal_i2c_range[i] != I2C_CLIENT_END); - i += 2) { - if ((addr >= address_data->normal_i2c_range[i]) && - (addr <= address_data->normal_i2c_range[i+1])) { - found = 1; - dev_dbg(&adapter->dev, "found normal i2c_range entry for adapter %d, " - "addr %04x\n", adap_id,addr); - } - } - - for (i = 0; !found && (address_data->probe[i] != I2C_CLIENT_END); i += 2) { if (((adap_id == address_data->probe[i]) || @@ -791,18 +768,6 @@ "addr %04x\n", adap_id,addr); } } - for (i = 0; - !found && (address_data->probe_range[i] != I2C_CLIENT_END); - i += 3) { - if (((adap_id == address_data->probe_range[i]) || - (address_data->probe_range[i] == ANY_I2C_BUS)) && - (addr >= address_data->probe_range[i+1]) && - (addr <= address_data->probe_range[i+2])) { - found = 1; - dev_dbg(&adapter->dev, "found probe_range parameter for adapter %d, " - "addr %04x\n", adap_id,addr); - } - } if (!found) continue; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/macintosh/therm_windtunnel.c linux-2.6.12-rc2-i2c/drivers/macintosh/therm_windtunnel.c --- linux-2.6.12-rc2/drivers/macintosh/therm_windtunnel.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/macintosh/therm_windtunnel.c 2005-04-09 08:57:16.000000000 -0700 @@ -51,8 +51,10 @@ static int do_probe( struct i2c_adapter *adapter, int addr, int kind); /* scan 0x48-0x4f (DS1775) and 0x2c-2x2f (ADM1030) */ -static unsigned short normal_i2c[] = { 0x49, 0x2c, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x48, 0x4f, 0x2c, 0x2f, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, + 0x4c, 0x4d, 0x4e, 0x4f, + 0x2c, 0x2d, 0x2e, 0x2f, + I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/adv7170.c linux-2.6.12-rc2-i2c/drivers/media/video/adv7170.c --- linux-2.6.12-rc2/drivers/media/video/adv7170.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/adv7170.c 2005-04-09 08:57:16.000000000 -0700 @@ -384,22 +384,14 @@ I2C_ADV7171 >> 1, (I2C_ADV7171 >> 1) + 1, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -static unsigned short probe[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short probe_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short force[2] = { I2C_CLIENT_END , I2C_CLIENT_END }; +static unsigned short ignore = I2C_CLIENT_END; static struct i2c_client_address_data addr_data = { .normal_i2c = normal_i2c, - .normal_i2c_range = normal_i2c_range, - .probe = probe, - .probe_range = probe_range, - .ignore = ignore, - .ignore_range = ignore_range, - .force = force + .probe = &ignore, + .ignore = &ignore, + .force = &ignore, }; static struct i2c_driver i2c_driver_adv7170; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/adv7175.c linux-2.6.12-rc2-i2c/drivers/media/video/adv7175.c --- linux-2.6.12-rc2/drivers/media/video/adv7175.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/adv7175.c 2005-04-09 08:57:16.000000000 -0700 @@ -434,22 +434,14 @@ I2C_ADV7176 >> 1, (I2C_ADV7176 >> 1) + 1, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -static unsigned short probe[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short probe_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short force[2] = { I2C_CLIENT_END , I2C_CLIENT_END }; +static unsigned short ignore = I2C_CLIENT_END; static struct i2c_client_address_data addr_data = { .normal_i2c = normal_i2c, - .normal_i2c_range = normal_i2c_range, - .probe = probe, - .probe_range = probe_range, - .ignore = ignore, - .ignore_range = ignore_range, - .force = force + .probe = &ignore, + .ignore = &ignore, + .force = &ignore, }; static struct i2c_driver i2c_driver_adv7175; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/bt819.c linux-2.6.12-rc2-i2c/drivers/media/video/bt819.c --- linux-2.6.12-rc2/drivers/media/video/bt819.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/bt819.c 2005-04-09 08:57:16.000000000 -0700 @@ -500,22 +500,14 @@ I2C_BT819 >> 1, I2C_CLIENT_END, }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -static unsigned short probe[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short probe_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short force[2] = { I2C_CLIENT_END , I2C_CLIENT_END }; +static unsigned short ignore = I2C_CLIENT_END; static struct i2c_client_address_data addr_data = { .normal_i2c = normal_i2c, - .normal_i2c_range = normal_i2c_range, - .probe = probe, - .probe_range = probe_range, - .ignore = ignore, - .ignore_range = ignore_range, - .force = force + .probe = &ignore, + .ignore = &ignore, + .force = &ignore, }; static struct i2c_driver i2c_driver_bt819; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/bt832.c linux-2.6.12-rc2-i2c/drivers/media/video/bt832.c --- linux-2.6.12-rc2/drivers/media/video/bt832.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/bt832.c 2005-04-09 08:57:16.000000000 -0700 @@ -39,8 +39,8 @@ MODULE_LICENSE("GPL"); /* Addresses to scan */ -static unsigned short normal_i2c[] = {I2C_CLIENT_END}; -static unsigned short normal_i2c_range[] = {I2C_BT832_ALT1>>1,I2C_BT832_ALT2>>1,I2C_CLIENT_END}; +static unsigned short normal_i2c[] = { I2C_BT832_ALT1>>1, I2C_BT832_ALT2>>1, + I2C_CLIENT_END }; I2C_CLIENT_INSMOD; /* ---------------------------------------------------------------------- */ diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/bt856.c linux-2.6.12-rc2-i2c/drivers/media/video/bt856.c --- linux-2.6.12-rc2/drivers/media/video/bt856.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/bt856.c 2005-04-09 08:57:16.000000000 -0700 @@ -288,22 +288,14 @@ * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' */ static unsigned short normal_i2c[] = { I2C_BT856 >> 1, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -static unsigned short probe[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short probe_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short force[2] = { I2C_CLIENT_END , I2C_CLIENT_END }; +static unsigned short ignore = I2C_CLIENT_END; static struct i2c_client_address_data addr_data = { .normal_i2c = normal_i2c, - .normal_i2c_range = normal_i2c_range, - .probe = probe, - .probe_range = probe_range, - .ignore = ignore, - .ignore_range = ignore_range, - .force = force + .probe = &ignore, + .ignore = &ignore, + .force = &ignore, }; static struct i2c_driver i2c_driver_bt856; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/msp3400.c linux-2.6.12-rc2-i2c/drivers/media/video/msp3400.c --- linux-2.6.12-rc2/drivers/media/video/msp3400.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/msp3400.c 2005-04-09 08:57:16.000000000 -0700 @@ -147,7 +147,6 @@ I2C_MSP3400C_ALT >> 1, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = {I2C_CLIENT_END,I2C_CLIENT_END}; I2C_CLIENT_INSMOD; /* ----------------------------------------------------------------------- */ diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/saa5246a.c linux-2.6.12-rc2-i2c/drivers/media/video/saa5246a.c --- linux-2.6.12-rc2/drivers/media/video/saa5246a.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/saa5246a.c 2005-04-09 08:57:16.000000000 -0700 @@ -64,7 +64,6 @@ /* Addresses to scan */ static unsigned short normal_i2c[] = { I2C_ADDRESS, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; I2C_CLIENT_INSMOD; static struct i2c_client client_template; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/saa5249.c linux-2.6.12-rc2-i2c/drivers/media/video/saa5249.c --- linux-2.6.12-rc2/drivers/media/video/saa5249.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/saa5249.c 2005-04-09 08:57:16.000000000 -0700 @@ -132,7 +132,6 @@ /* Addresses to scan */ static unsigned short normal_i2c[] = {34>>1,I2C_CLIENT_END}; -static unsigned short normal_i2c_range[] = {I2C_CLIENT_END}; I2C_CLIENT_INSMOD; static struct i2c_client client_template; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/saa7110.c linux-2.6.12-rc2-i2c/drivers/media/video/saa7110.c --- linux-2.6.12-rc2/drivers/media/video/saa7110.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/saa7110.c 2005-04-09 08:57:16.000000000 -0700 @@ -463,22 +463,14 @@ (I2C_SAA7110 >> 1) + 1, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -static unsigned short probe[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short probe_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short force[2] = { I2C_CLIENT_END , I2C_CLIENT_END }; +static unsigned short ignore = I2C_CLIENT_END; static struct i2c_client_address_data addr_data = { .normal_i2c = normal_i2c, - .normal_i2c_range = normal_i2c_range, - .probe = probe, - .probe_range = probe_range, - .ignore = ignore, - .ignore_range = ignore_range, - .force = force + .probe = &ignore, + .ignore = &ignore, + .force = &ignore, }; static struct i2c_driver i2c_driver_saa7110; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/saa7111.c linux-2.6.12-rc2-i2c/drivers/media/video/saa7111.c --- linux-2.6.12-rc2/drivers/media/video/saa7111.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/saa7111.c 2005-04-09 08:57:16.000000000 -0700 @@ -482,22 +482,14 @@ * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' */ static unsigned short normal_i2c[] = { I2C_SAA7111 >> 1, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -static unsigned short probe[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short probe_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short force[2] = { I2C_CLIENT_END , I2C_CLIENT_END }; +static unsigned short ignore = I2C_CLIENT_END; static struct i2c_client_address_data addr_data = { .normal_i2c = normal_i2c, - .normal_i2c_range = normal_i2c_range, - .probe = probe, - .probe_range = probe_range, - .ignore = ignore, - .ignore_range = ignore_range, - .force = force + .probe = &ignore, + .ignore = &ignore, + .force = &ignore, }; static struct i2c_driver i2c_driver_saa7111; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/saa7114.c linux-2.6.12-rc2-i2c/drivers/media/video/saa7114.c --- linux-2.6.12-rc2/drivers/media/video/saa7114.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/saa7114.c 2005-04-09 08:57:16.000000000 -0700 @@ -820,22 +820,14 @@ */ static unsigned short normal_i2c[] = { I2C_SAA7114 >> 1, I2C_SAA7114A >> 1, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -static unsigned short probe[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short probe_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short force[2] = { I2C_CLIENT_END , I2C_CLIENT_END }; +static unsigned short ignore = I2C_CLIENT_END; static struct i2c_client_address_data addr_data = { .normal_i2c = normal_i2c, - .normal_i2c_range = normal_i2c_range, - .probe = probe, - .probe_range = probe_range, - .ignore = ignore, - .ignore_range = ignore_range, - .force = force + .probe = &ignore, + .ignore = &ignore, + .force = &ignore, }; static struct i2c_driver i2c_driver_saa7114; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/saa7134/saa6752hs.c linux-2.6.12-rc2-i2c/drivers/media/video/saa7134/saa6752hs.c --- linux-2.6.12-rc2/drivers/media/video/saa7134/saa6752hs.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/saa7134/saa6752hs.c 2005-04-09 08:57:16.000000000 -0700 @@ -22,7 +22,6 @@ /* Addresses to scan */ static unsigned short normal_i2c[] = {0x20, I2C_CLIENT_END}; -static unsigned short normal_i2c_range[] = {I2C_CLIENT_END}; I2C_CLIENT_INSMOD; MODULE_DESCRIPTION("device driver for saa6752hs MPEG2 encoder"); diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/saa7185.c linux-2.6.12-rc2-i2c/drivers/media/video/saa7185.c --- linux-2.6.12-rc2/drivers/media/video/saa7185.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/saa7185.c 2005-04-09 08:57:16.000000000 -0700 @@ -380,22 +380,14 @@ * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' */ static unsigned short normal_i2c[] = { I2C_SAA7185 >> 1, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -static unsigned short probe[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short probe_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short force[2] = { I2C_CLIENT_END , I2C_CLIENT_END }; +static unsigned short ignore = I2C_CLIENT_END; static struct i2c_client_address_data addr_data = { .normal_i2c = normal_i2c, - .normal_i2c_range = normal_i2c_range, - .probe = probe, - .probe_range = probe_range, - .ignore = ignore, - .ignore_range = ignore_range, - .force = force + .probe = &ignore, + .ignore = &ignore, + .force = &ignore, }; static struct i2c_driver i2c_driver_saa7185; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/tda7432.c linux-2.6.12-rc2-i2c/drivers/media/video/tda7432.c --- linux-2.6.12-rc2/drivers/media/video/tda7432.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/tda7432.c 2005-04-09 08:57:16.000000000 -0700 @@ -74,7 +74,6 @@ I2C_TDA7432 >> 1, I2C_CLIENT_END, }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; /* Structure of address and subaddresses for the tda7432 */ diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/tda9840.c linux-2.6.12-rc2-i2c/drivers/media/video/tda9840.c --- linux-2.6.12-rc2/drivers/media/video/tda9840.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/tda9840.c 2005-04-09 08:57:16.000000000 -0700 @@ -43,7 +43,6 @@ /* addresses to scan, found only at 0x42 (7-Bit) */ static unsigned short normal_i2c[] = { I2C_TDA9840, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; /* magic definition of all other variables and things */ I2C_CLIENT_INSMOD; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/tda9875.c linux-2.6.12-rc2-i2c/drivers/media/video/tda9875.c --- linux-2.6.12-rc2/drivers/media/video/tda9875.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/tda9875.c 2005-04-09 08:57:16.000000000 -0700 @@ -44,7 +44,6 @@ I2C_TDA9875 >> 1, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = {I2C_CLIENT_END}; I2C_CLIENT_INSMOD; /* This is a superset of the TDA9875 */ diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/tda9887.c linux-2.6.12-rc2-i2c/drivers/media/video/tda9887.c --- linux-2.6.12-rc2/drivers/media/video/tda9887.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/tda9887.c 2005-04-09 08:57:16.000000000 -0700 @@ -33,7 +33,6 @@ 0x96 >>1, I2C_CLIENT_END, }; -static unsigned short normal_i2c_range[] = {I2C_CLIENT_END,I2C_CLIENT_END}; I2C_CLIENT_INSMOD; /* insmod options */ diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/tea6415c.c linux-2.6.12-rc2-i2c/drivers/media/video/tea6415c.c --- linux-2.6.12-rc2/drivers/media/video/tea6415c.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/tea6415c.c 2005-04-09 08:57:16.000000000 -0700 @@ -43,7 +43,6 @@ /* addresses to scan, found only at 0x03 and/or 0x43 (7-bit) */ static unsigned short normal_i2c[] = { I2C_TEA6415C_1, I2C_TEA6415C_2, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; /* magic definition of all other variables and things */ I2C_CLIENT_INSMOD; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/tea6420.c linux-2.6.12-rc2-i2c/drivers/media/video/tea6420.c --- linux-2.6.12-rc2/drivers/media/video/tea6420.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/tea6420.c 2005-04-09 08:57:16.000000000 -0700 @@ -40,7 +40,6 @@ /* addresses to scan, found only at 0x4c and/or 0x4d (7-Bit) */ static unsigned short normal_i2c[] = { I2C_TEA6420_1, I2C_TEA6420_2, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; /* magic definition of all other variables and things */ I2C_CLIENT_INSMOD; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/tuner-3036.c linux-2.6.12-rc2-i2c/drivers/media/video/tuner-3036.c --- linux-2.6.12-rc2/drivers/media/video/tuner-3036.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/tuner-3036.c 2005-04-09 08:57:16.000000000 -0700 @@ -34,19 +34,14 @@ static struct i2c_client client_template; /* Addresses to scan */ -static unsigned short normal_i2c[] = {I2C_CLIENT_END}; -static unsigned short normal_i2c_range[] = {0x60, 0x61, I2C_CLIENT_END}; -static unsigned short probe[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short probe_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short force[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x60, 0x61, I2C_CLIENT_END }; +static unsigned short ignore = I2C_CLIENT_END; static struct i2c_client_address_data addr_data = { - normal_i2c, normal_i2c_range, - probe, probe_range, - ignore, ignore_range, - force + .normal_i2c = normal_i2c, + .probe = &ignore, + .ignore = &ignore, + .force = &ignore, }; /* ---------------------------------------------------------------------- */ diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/tuner-core.c linux-2.6.12-rc2-i2c/drivers/media/video/tuner-core.c --- linux-2.6.12-rc2/drivers/media/video/tuner-core.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/tuner-core.c 2005-04-09 08:57:16.000000000 -0700 @@ -28,10 +28,8 @@ /* standard i2c insmod options */ static unsigned short normal_i2c[] = { 0x4b, /* tda8290 */ - I2C_CLIENT_END -}; -static unsigned short normal_i2c_range[] = { - 0x60, 0x6f, + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; @@ -225,9 +223,8 @@ static int tuner_probe(struct i2c_adapter *adap) { if (0 != addr) { - normal_i2c[0] = addr; - normal_i2c_range[0] = addr; - normal_i2c_range[1] = addr; + normal_i2c[0] = addr; + normal_i2c[1] = I2C_CLIENT_END; } this_adap = 0; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/tvaudio.c linux-2.6.12-rc2-i2c/drivers/media/video/tvaudio.c --- linux-2.6.12-rc2/drivers/media/video/tvaudio.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/tvaudio.c 2005-04-09 08:57:16.000000000 -0700 @@ -148,7 +148,6 @@ I2C_TDA9874 >> 1, I2C_PIC16C54 >> 1, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; static struct i2c_driver driver; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/tveeprom.c linux-2.6.12-rc2-i2c/drivers/media/video/tveeprom.c --- linux-2.6.12-rc2/drivers/media/video/tveeprom.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/tveeprom.c 2005-04-09 08:57:16.000000000 -0700 @@ -482,7 +482,6 @@ 0xa0 >> 1, I2C_CLIENT_END, }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; I2C_CLIENT_INSMOD; struct i2c_driver i2c_driver_tveeprom; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/media/video/vpx3220.c linux-2.6.12-rc2-i2c/drivers/media/video/vpx3220.c --- linux-2.6.12-rc2/drivers/media/video/vpx3220.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/media/video/vpx3220.c 2005-04-09 08:57:16.000000000 -0700 @@ -569,22 +569,14 @@ { I2C_VPX3220 >> 1, (I2C_VPX3220 >> 1) + 4, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -static unsigned short probe[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short probe_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; -static unsigned short force[2] = { I2C_CLIENT_END , I2C_CLIENT_END }; +static unsigned short ignore = I2C_CLIENT_END; static struct i2c_client_address_data addr_data = { .normal_i2c = normal_i2c, - .normal_i2c_range = normal_i2c_range, - .probe = probe, - .probe_range = probe_range, - .ignore = ignore, - .ignore_range = ignore_range, - .force = force + .probe = &ignore, + .ignore = &ignore, + .force = &ignore, }; static struct i2c_driver vpx3220_i2c_driver; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/video/matrox/matroxfb_maven.c linux-2.6.12-rc2-i2c/drivers/video/matrox/matroxfb_maven.c --- linux-2.6.12-rc2/drivers/video/matrox/matroxfb_maven.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/video/matrox/matroxfb_maven.c 2005-04-09 08:57:16.000000000 -0700 @@ -1230,7 +1230,6 @@ } static unsigned short normal_i2c[] = { MAVEN_I2CID, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { MAVEN_I2CID, MAVEN_I2CID, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; static struct i2c_driver maven_driver; diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/w1/w1.c linux-2.6.12-rc2-i2c/drivers/w1/w1.c --- linux-2.6.12-rc2/drivers/w1/w1.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/w1/w1.c 2005-04-09 08:57:17.000000000 -0700 @@ -522,10 +522,11 @@ slave_count++; } - if (slave_count == dev->slave_count && rn ) { - tmp = cpu_to_le64(rn); - if(((rn >> 56) & 0xff) == w1_calc_crc8((u8 *)&tmp, 7)) - w1_attach_slave_device(dev, (struct w1_reg_num *) &rn); + rn = cpu_to_le64(rn); + + if (slave_count == dev->slave_count && + rn && ((le64_to_cpu(rn) >> 56) & 0xff) == w1_calc_crc8((u8 *)&rn, 7)) { + w1_attach_slave_device(dev, tmp); } atomic_dec(&dev->refcnt); diff -Naur -X ../dontdiff linux-2.6.12-rc2/drivers/w1/w1_smem.c linux-2.6.12-rc2-i2c/drivers/w1/w1_smem.c --- linux-2.6.12-rc2/drivers/w1/w1_smem.c 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/drivers/w1/w1_smem.c 2005-04-09 08:57:17.000000000 -0700 @@ -60,7 +60,7 @@ int i; ssize_t count = 0; - for (i = 0; i < 9; ++i) + for (i = 0; i < 8; ++i) count += sprintf(buf + count, "%02x ", ((u8 *)&sl->reg_num)[i]); count += sprintf(buf + count, "\n"); @@ -87,7 +87,7 @@ count = 0; goto out; } - for (i = 0; i < 9; ++i) + for (i = 0; i < 8; ++i) count += sprintf(buf + count, "%02x ", ((u8 *)&sl->reg_num)[i]); count += sprintf(buf + count, "\n"); diff -Naur -X ../dontdiff linux-2.6.12-rc2/include/linux/i2c.h linux-2.6.12-rc2-i2c/include/linux/i2c.h --- linux-2.6.12-rc2/include/linux/i2c.h 2005-04-07 00:36:31.000000000 -0700 +++ linux-2.6.12-rc2-i2c/include/linux/i2c.h 2005-04-09 08:57:16.000000000 -0700 @@ -290,11 +290,8 @@ */ struct i2c_client_address_data { unsigned short *normal_i2c; - unsigned short *normal_i2c_range; unsigned short *probe; - unsigned short *probe_range; unsigned short *ignore; - unsigned short *ignore_range; unsigned short *force; }; @@ -563,24 +560,15 @@ #define I2C_CLIENT_INSMOD \ I2C_CLIENT_MODULE_PARM(probe, \ "List of adapter,address pairs to scan additionally"); \ - I2C_CLIENT_MODULE_PARM(probe_range, \ - "List of adapter,start-addr,end-addr triples to scan " \ - "additionally"); \ I2C_CLIENT_MODULE_PARM(ignore, \ "List of adapter,address pairs not to scan"); \ - I2C_CLIENT_MODULE_PARM(ignore_range, \ - "List of adapter,start-addr,end-addr triples not to " \ - "scan"); \ I2C_CLIENT_MODULE_PARM(force, \ "List of adapter,address pairs to boldly assume " \ "to be present"); \ static struct i2c_client_address_data addr_data = { \ .normal_i2c = normal_i2c, \ - .normal_i2c_range = normal_i2c_range, \ .probe = probe, \ - .probe_range = probe_range, \ .ignore = ignore, \ - .ignore_range = ignore_range, \ .force = force, \ }