From: David Brownell Subject: i2c: hwmon drivers stop using i2c_adapter.dev This updates the hwmon drivers to prepare for removing the undesirable non-class i2c_adapter driver and its needless "i2c_adapter.dev" device. That's used in dev_{err,dbg,info,warn}() diagnostics; the change switches to using "adapter->class_dev.dev" instead of "&adapter->dev". Signed-off-by: David Brownell Signed-off-by: Jean Delvare --- drivers/hwmon/adm1025.c | 4 ++-- drivers/hwmon/adm1026.c | 9 +++++---- drivers/hwmon/adm9240.c | 8 +++++--- drivers/hwmon/gl518sm.c | 2 +- drivers/hwmon/lm63.c | 2 +- drivers/hwmon/lm78.c | 3 ++- drivers/hwmon/lm83.c | 4 ++-- drivers/hwmon/lm85.c | 19 ++++++++++--------- drivers/hwmon/lm87.c | 2 +- drivers/hwmon/lm90.c | 2 +- drivers/hwmon/max1619.c | 4 ++-- drivers/hwmon/sis5595.c | 3 ++- drivers/hwmon/smsc47b397.c | 3 ++- drivers/hwmon/smsc47m1.c | 6 ++++-- drivers/hwmon/smsc47m192.c | 4 ++-- drivers/hwmon/via686a.c | 9 +++++---- drivers/hwmon/vt8231.c | 10 +++++----- drivers/hwmon/w83627hf.c | 2 +- drivers/hwmon/w83781d.c | 20 ++++++++++---------- drivers/hwmon/w83793.c | 3 ++- drivers/hwmon/w83l785ts.c | 4 ++-- 21 files changed, 67 insertions(+), 56 deletions(-) --- linux-2.6.20-rc5.orig/drivers/hwmon/adm1025.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/adm1025.c 2007-01-18 14:45:27.000000000 +0100 @@ -404,7 +404,7 @@ static int adm1025_detect(struct i2c_ada ADM1025_REG_STATUS1) & 0xC0) != 0x00 || (i2c_smbus_read_byte_data(new_client, ADM1025_REG_STATUS2) & 0xBC) != 0x00) { - dev_dbg(&adapter->dev, + dev_dbg(adapter->class_dev.dev, "ADM1025 detection failed at 0x%02x.\n", address); goto exit_free; @@ -432,7 +432,7 @@ static int adm1025_detect(struct i2c_ada } if (kind <= 0) { /* identification failed */ - dev_info(&adapter->dev, + dev_info(adapter->class_dev.dev, "Unsupported chip (man_id=0x%02X, " "chip_id=0x%02X).\n", man_id, chip_id); goto exit_free; --- linux-2.6.20-rc5.orig/drivers/hwmon/adm1026.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/adm1026.c 2007-01-18 14:45:27.000000000 +0100 @@ -1574,6 +1574,7 @@ static int adm1026_detect(struct i2c_ada int kind) { int company, verstep; + struct device *adap_dev = adapter->class_dev.dev; struct i2c_client *new_client; struct adm1026_data *data; int err = 0; @@ -1619,11 +1620,11 @@ static int adm1026_detect(struct i2c_ada kind = adm1026; } else if (company == ADM1026_COMPANY_ANALOG_DEV && (verstep & 0xf0) == ADM1026_VERSTEP_GENERIC) { - dev_err(&adapter->dev, ": Unrecognized stepping " + dev_err(adap_dev, "Unrecognized stepping " "0x%02x. Defaulting to ADM1026.\n", verstep); kind = adm1026; } else if ((verstep & 0xf0) == ADM1026_VERSTEP_GENERIC) { - dev_err(&adapter->dev, ": Found version/stepping " + dev_err(adap_dev, "Found version/stepping " "0x%02x. Assuming generic ADM1026.\n", verstep); kind = any_chip; @@ -1632,7 +1633,7 @@ static int adm1026_detect(struct i2c_ada "failed\n"); /* Not an ADM1026 ... */ if (kind == 0) { /* User used force=x,y */ - dev_err(&adapter->dev, "Generic ADM1026 not " + dev_err(adap_dev, "Generic ADM1026 not " "found at %d,0x%02x. Try " "force_adm1026.\n", i2c_adapter_id(adapter), address); @@ -1651,7 +1652,7 @@ static int adm1026_detect(struct i2c_ada type_name = "adm1026"; break; default : - dev_err(&adapter->dev, ": Internal error, invalid " + dev_err(adap_dev, "Internal error, invalid " "kind (%d)!", kind); err = -EFAULT; goto exitfree; --- linux-2.6.20-rc5.orig/drivers/hwmon/adm9240.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/adm9240.c 2007-01-18 14:45:27.000000000 +0100 @@ -539,7 +539,8 @@ static int adm9240_detect(struct i2c_ada /* verify chip: reg address should match i2c address */ if (i2c_smbus_read_byte_data(new_client, ADM9240_REG_I2C_ADDR) != address) { - dev_err(&adapter->dev, "detect fail: address match, " + dev_err(adapter->class_dev.dev, + "detect fail: address match, " "0x%02x\n", address); goto exit_free; } @@ -554,7 +555,8 @@ static int adm9240_detect(struct i2c_ada } else if (man_id == 0x01) { kind = lm81; } else { - dev_err(&adapter->dev, "detect fail: unknown manuf, " + dev_err(adapter->class_dev.dev, + "detect fail: unknown manuf, " "0x%02x\n", man_id); goto exit_free; } @@ -562,7 +564,7 @@ static int adm9240_detect(struct i2c_ada /* successful detect, print chip info */ die_rev = i2c_smbus_read_byte_data(new_client, ADM9240_REG_DIE_REV); - dev_info(&adapter->dev, "found %s revision %u\n", + dev_info(adapter->class_dev.dev, "found %s revision %u\n", man_id == 0x23 ? "ADM9240" : man_id == 0xda ? "DS1780" : "LM81", die_rev); } --- linux-2.6.20-rc5.orig/drivers/hwmon/gl518sm.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/gl518sm.c 2007-01-18 14:45:27.000000000 +0100 @@ -433,7 +433,7 @@ static int gl518_detect(struct i2c_adapt kind = gl518sm_r80; } else { if (kind <= 0) - dev_info(&adapter->dev, + dev_info(adapter->class_dev.dev, "Ignoring 'force' parameter for unknown " "chip at adapter %d, address 0x%02x\n", i2c_adapter_id(adapter), address); --- linux-2.6.20-rc5.orig/drivers/hwmon/lm63.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/lm63.c 2007-01-18 14:45:27.000000000 +0100 @@ -474,7 +474,7 @@ static int lm63_detect(struct i2c_adapte && (reg_alert_mask & 0xA4) == 0xA4) { kind = lm63; } else { /* failed */ - dev_dbg(&adapter->dev, "Unsupported chip " + dev_dbg(adapter->class_dev.dev, "Unsupported chip " "(man_id=0x%02X, chip_id=0x%02X).\n", man_id, chip_id); goto exit_free; --- linux-2.6.20-rc5.orig/drivers/hwmon/lm78.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/lm78.c 2007-01-18 14:45:27.000000000 +0100 @@ -624,7 +624,8 @@ static int lm78_detect(struct i2c_adapte kind = lm79; else { if (kind == 0) - dev_warn(&adapter->dev, "Ignoring 'force' " + dev_warn(adapter->class_dev.dev, + "Ignoring 'force' " "parameter for unknown chip at " "adapter %d, address 0x%02x\n", i2c_adapter_id(adapter), address); --- linux-2.6.20-rc5.orig/drivers/hwmon/lm83.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/lm83.c 2007-01-18 14:45:27.000000000 +0100 @@ -337,7 +337,7 @@ static int lm83_detect(struct i2c_adapte & 0x48) != 0x00) || ((i2c_smbus_read_byte_data(new_client, LM83_REG_R_CONFIG) & 0x41) != 0x00)) { - dev_dbg(&adapter->dev, + dev_dbg(adapter->class_dev.dev, "LM83 detection failed at 0x%02x.\n", address); goto exit_free; } @@ -361,7 +361,7 @@ static int lm83_detect(struct i2c_adapte } if (kind <= 0) { /* identification failed */ - dev_info(&adapter->dev, + dev_info(adapter->class_dev.dev, "Unsupported chip (man_id=0x%02X, " "chip_id=0x%02X).\n", man_id, chip_id); goto exit_free; --- linux-2.6.20-rc5.orig/drivers/hwmon/lm85.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/lm85.c 2007-01-18 14:45:27.000000000 +0100 @@ -1112,6 +1112,7 @@ static int lm85_detect(struct i2c_adapte int kind) { int company, verstep ; + struct device *adap_dev = adapter->class_dev.dev; struct i2c_client *new_client = NULL; struct lm85_data *data; int err = 0; @@ -1144,14 +1145,14 @@ static int lm85_detect(struct i2c_adapte company = lm85_read_value(new_client, LM85_REG_COMPANY); verstep = lm85_read_value(new_client, LM85_REG_VERSTEP); - dev_dbg(&adapter->dev, "Detecting device at %d,0x%02x with" + dev_dbg(adap_dev, "Detecting device at %d,0x%02x with" " COMPANY: 0x%02x and VERSTEP: 0x%02x\n", i2c_adapter_id(new_client->adapter), new_client->addr, company, verstep); /* If auto-detecting, Determine the chip type. */ if (kind <= 0) { - dev_dbg(&adapter->dev, "Autodetecting device at %d,0x%02x ...\n", + dev_dbg(adap_dev, "Autodetecting device at %d,0x%02x ...\n", i2c_adapter_id(adapter), address ); if( company == LM85_COMPANY_NATIONAL && verstep == LM85_VERSTEP_LM85C ) { @@ -1161,7 +1162,7 @@ static int lm85_detect(struct i2c_adapte kind = lm85b ; } else if( company == LM85_COMPANY_NATIONAL && (verstep & LM85_VERSTEP_VMASK) == LM85_VERSTEP_GENERIC ) { - dev_err(&adapter->dev, "Unrecognized version/stepping 0x%02x" + dev_err(adap_dev, "Unrecognized version/stepping 0x%02x" " Defaulting to LM85.\n", verstep); kind = any_chip ; } else if( company == LM85_COMPANY_ANALOG_DEV @@ -1173,7 +1174,7 @@ static int lm85_detect(struct i2c_adapte kind = adt7463 ; } else if( company == LM85_COMPANY_ANALOG_DEV && (verstep & LM85_VERSTEP_VMASK) == LM85_VERSTEP_GENERIC ) { - dev_err(&adapter->dev, "Unrecognized version/stepping 0x%02x" + dev_err(adap_dev, "Unrecognized version/stepping 0x%02x" " Defaulting to Generic LM85.\n", verstep ); kind = any_chip ; } else if( company == LM85_COMPANY_SMSC @@ -1191,19 +1192,19 @@ static int lm85_detect(struct i2c_adapte kind = emc6d102 ; } else if( company == LM85_COMPANY_SMSC && (verstep & LM85_VERSTEP_VMASK) == LM85_VERSTEP_GENERIC) { - dev_err(&adapter->dev, "lm85: Detected SMSC chip\n"); - dev_err(&adapter->dev, "lm85: Unrecognized version/stepping 0x%02x" + dev_err(adap_dev, "lm85: Detected SMSC chip\n"); + dev_err(adap_dev, "lm85: Unrecognized version/stepping 0x%02x" " Defaulting to Generic LM85.\n", verstep ); kind = any_chip ; } else if( kind == any_chip && (verstep & LM85_VERSTEP_VMASK) == LM85_VERSTEP_GENERIC) { - dev_err(&adapter->dev, "Generic LM85 Version 6 detected\n"); + dev_err(adap_dev, "Generic LM85 Version 6 detected\n"); /* Leave kind as "any_chip" */ } else { - dev_dbg(&adapter->dev, "Autodetection failed\n"); + dev_dbg(adap_dev, "Autodetection failed\n"); /* Not an LM85 ... */ if( kind == any_chip ) { /* User used force=x,y */ - dev_err(&adapter->dev, "Generic LM85 Version 6 not" + dev_err(adap_dev, "Generic LM85 Version 6 not" " found at %d,0x%02x. Try force_lm85c.\n", i2c_adapter_id(adapter), address ); } --- linux-2.6.20-rc5.orig/drivers/hwmon/lm87.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/lm87.c 2007-01-18 14:45:27.000000000 +0100 @@ -652,7 +652,7 @@ static int lm87_detect(struct i2c_adapte if (rev < 0x01 || rev > 0x08 || (lm87_read_value(new_client, LM87_REG_CONFIG) & 0x80) || lm87_read_value(new_client, LM87_REG_COMPANY_ID) != 0x02) { - dev_dbg(&adapter->dev, + dev_dbg(adapter->class_dev.dev, "LM87 detection failed at 0x%02x.\n", address); goto exit_free; --- linux-2.6.20-rc5.orig/drivers/hwmon/lm90.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/lm90.c 2007-01-18 14:45:27.000000000 +0100 @@ -578,7 +578,7 @@ static int lm90_detect(struct i2c_adapte } if (kind <= 0) { /* identification failed */ - dev_info(&adapter->dev, + dev_info(adapter->class_dev.dev, "Unsupported chip (man_id=0x%02X, " "chip_id=0x%02X).\n", man_id, chip_id); goto exit_free; --- linux-2.6.20-rc5.orig/drivers/hwmon/max1619.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/max1619.c 2007-01-18 14:45:27.000000000 +0100 @@ -248,7 +248,7 @@ static int max1619_detect(struct i2c_ada MAX1619_REG_R_STATUS); if ((reg_config & 0x03) != 0x00 || reg_convrate > 0x07 || (reg_status & 0x61 ) !=0x00) { - dev_dbg(&adapter->dev, + dev_dbg(adapter->class_dev.dev, "MAX1619 detection failed at 0x%02x.\n", address); goto exit_free; @@ -267,7 +267,7 @@ static int max1619_detect(struct i2c_ada kind = max1619; if (kind <= 0) { /* identification failed */ - dev_info(&adapter->dev, + dev_info(adapter->class_dev.dev, "Unsupported chip (man_id=0x%02X, " "chip_id=0x%02X).\n", man_id, chip_id); goto exit_free; --- linux-2.6.20-rc5.orig/drivers/hwmon/sis5595.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/sis5595.c 2007-01-18 14:45:27.000000000 +0100 @@ -538,7 +538,8 @@ static int sis5595_detect(struct i2c_ada goto exit; } if (force_addr) { - dev_warn(&adapter->dev, "forcing ISA address 0x%04X\n", address); + dev_warn(adapter->class_dev.dev, + "forcing ISA address 0x%04X\n", address); if (PCIBIOS_SUCCESSFUL != pci_write_config_word(s_bridge, SIS5595_BASE_REG, address)) goto exit_release; --- linux-2.6.20-rc5.orig/drivers/hwmon/smsc47b397.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/smsc47b397.c 2007-01-18 14:45:27.000000000 +0100 @@ -255,7 +255,8 @@ static int smsc47b397_detect(struct i2c_ if (!request_region(address, SMSC_EXTENT, smsc47b397_driver.driver.name)) { - dev_err(&adapter->dev, "Region 0x%x already in use!\n", + dev_err(adapter->class_dev.dev, + "Region 0x%x already in use!\n", address); return -EBUSY; } --- linux-2.6.20-rc5.orig/drivers/hwmon/smsc47m1.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/smsc47m1.c 2007-01-18 14:45:27.000000000 +0100 @@ -424,7 +424,8 @@ static int smsc47m1_detect(struct i2c_ad int fan1, fan2, pwm1, pwm2; if (!request_region(address, SMSC_EXTENT, smsc47m1_driver.driver.name)) { - dev_err(&adapter->dev, "Region 0x%x already in use!\n", address); + dev_err(adapter->class_dev.dev, + "Region 0x%x already in use!\n", address); return -EBUSY; } @@ -455,7 +456,8 @@ static int smsc47m1_detect(struct i2c_ad pwm2 = (smsc47m1_read_value(new_client, SMSC47M1_REG_PPIN(1)) & 0x05) == 0x04; if (!(fan1 || fan2 || pwm1 || pwm2)) { - dev_warn(&adapter->dev, "Device at 0x%x is not configured, " + dev_warn(adapter->class_dev.dev, + "Device at 0x%x is not configured, " "will not use\n", new_client->addr); err = -ENODEV; goto error_free; --- linux-2.6.20-rc5.orig/drivers/hwmon/smsc47m192.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/smsc47m192.c 2007-01-18 14:45:27.000000000 +0100 @@ -517,11 +517,11 @@ static int smsc47m192_detect(struct i2c_ SMSC47M192_REG_VID) & 0x70) == 0x00 && (i2c_smbus_read_byte_data(client, SMSC47M192_REG_VID4) & 0xfe) == 0x80) { - dev_info(&adapter->dev, + dev_info(adapter->class_dev.dev, "found SMSC47M192 or SMSC47M997, " "version 2, stepping A%d\n", version & 0x0f); } else { - dev_dbg(&adapter->dev, + dev_dbg(adapter->class_dev.dev, "SMSC47M192 detection failed at 0x%02x\n", address); goto exit_free; --- linux-2.6.20-rc5.orig/drivers/hwmon/via686a.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/via686a.c 2007-01-18 14:45:27.000000000 +0100 @@ -628,6 +628,7 @@ static struct i2c_driver via686a_driver /* This is called when the module is loaded */ static int via686a_detect(struct i2c_adapter *adapter) { + struct device *adap_dev = adapter->class_dev.dev; struct i2c_client *new_client; struct via686a_data *data; int err = 0; @@ -637,7 +638,7 @@ static int via686a_detect(struct i2c_ada /* 8231 requires multiple of 256, we enforce that on 686 as well */ if (force_addr) { address = force_addr & 0xFF00; - dev_warn(&adapter->dev, "forcing ISA address 0x%04X\n", + dev_warn(adap_dev, "forcing ISA address 0x%04X\n", address); if (PCIBIOS_SUCCESSFUL != pci_write_config_word(s_bridge, VIA686A_BASE_REG, address)) @@ -648,13 +649,13 @@ static int via686a_detect(struct i2c_ada return -ENODEV; if (!(val & 0x0001)) { if (force_addr) { - dev_info(&adapter->dev, "enabling sensors\n"); + dev_info(adap_dev, "enabling sensors\n"); if (PCIBIOS_SUCCESSFUL != pci_write_config_word(s_bridge, VIA686A_ENABLE_REG, val | 0x0001)) return -ENODEV; } else { - dev_warn(&adapter->dev, "sensors disabled - enable " + dev_warn(adap_dev, "sensors disabled - enable " "with force_addr=0x%x\n", address); return -ENODEV; } @@ -663,7 +664,7 @@ static int via686a_detect(struct i2c_ada /* Reserve the ISA region */ if (!request_region(address, VIA686A_EXTENT, via686a_driver.driver.name)) { - dev_err(&adapter->dev, "region 0x%x already in use!\n", + dev_err(adap_dev, "region 0x%x already in use!\n", address); return -ENODEV; } --- linux-2.6.20-rc5.orig/drivers/hwmon/vt8231.c 2007-01-18 14:10:06.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/vt8231.c 2007-01-18 14:45:27.000000000 +0100 @@ -690,8 +690,8 @@ int vt8231_detect(struct i2c_adapter *ad /* 8231 requires multiple of 256 */ if (force_addr) { isa_address = force_addr & 0xFF00; - dev_warn(&adapter->dev, "forcing ISA address 0x%04X\n", - isa_address); + dev_warn(adapter->class_dev.dev, + "forcing ISA address 0x%04X\n", isa_address); if (PCIBIOS_SUCCESSFUL != pci_write_config_word(s_bridge, VT8231_BASE_REG, isa_address)) return -ENODEV; @@ -702,7 +702,7 @@ int vt8231_detect(struct i2c_adapter *ad return -ENODEV; if (!(val & 0x0001)) { - dev_warn(&adapter->dev, "enabling sensors\n"); + dev_warn(adapter->class_dev.dev, "enabling sensors\n"); if (PCIBIOS_SUCCESSFUL != pci_write_config_word(s_bridge, VT8231_ENABLE_REG, val | 0x0001)) @@ -712,8 +712,8 @@ int vt8231_detect(struct i2c_adapter *ad /* Reserve the ISA region */ if (!request_region(isa_address, VT8231_EXTENT, vt8231_pci_driver.name)) { - dev_err(&adapter->dev, "region 0x%x already in use!\n", - isa_address); + dev_err(adapter->class_dev.dev, + "region 0x%x already in use!\n", isa_address); return -ENODEV; } --- linux-2.6.20-rc5.orig/drivers/hwmon/w83627hf.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/w83627hf.c 2007-01-18 14:45:27.000000000 +0100 @@ -1079,7 +1079,7 @@ static int w83627hf_detect(struct i2c_ad else if (val == W687THF_DEVID) kind = w83687thf; else { - dev_info(&adapter->dev, + dev_info(adapter->class_dev.dev, "Unsupported chip (dev_id=0x%02X).\n", val); goto ERROR1; } --- linux-2.6.20-rc5.orig/drivers/hwmon/w83781d.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/w83781d.c 2007-01-18 14:45:27.000000000 +0100 @@ -1005,7 +1005,7 @@ w83781d_detect(struct i2c_adapter *adapt { int i = 0, val1 = 0, val2; struct i2c_client *client; - struct device *dev; + struct device *dev, *adap_dev = adapter->class_dev.dev; struct w83781d_data *data; int err; const char *client_name = ""; @@ -1021,7 +1021,7 @@ w83781d_detect(struct i2c_adapter *adapt /* Prevent users from forcing a kind for a bus it isn't supposed to possibly be on */ if (is_isa && (kind == as99127f || kind == w83783s)) { - dev_err(&adapter->dev, + dev_err(adap_dev, "Cannot force I2C-only chip for ISA address 0x%02x.\n", address); err = -EINVAL; @@ -1031,7 +1031,7 @@ w83781d_detect(struct i2c_adapter *adapt if (is_isa) if (!request_region(address, W83781D_EXTENT, w83781d_isa_driver.driver.name)) { - dev_dbg(&adapter->dev, "Request of region " + dev_dbg(adap_dev, "Request of region " "0x%x-0x%x for w83781d failed\n", address, address + W83781D_EXTENT - 1); err = -EBUSY; @@ -1050,7 +1050,7 @@ w83781d_detect(struct i2c_adapter *adapt if (inb_p(address + 2) != i || inb_p(address + 3) != i || inb_p(address + 7) != i) { - dev_dbg(&adapter->dev, "Detection of w83781d " + dev_dbg(adap_dev, "Detection of w83781d " "chip failed at step 1\n"); err = -ENODEV; goto ERROR1; @@ -1063,7 +1063,7 @@ w83781d_detect(struct i2c_adapter *adapt val2 = inb_p(address + 5) & 0x7f; if (val2 != (~i & 0x7f)) { outb_p(i, address + 5); - dev_dbg(&adapter->dev, "Detection of w83781d " + dev_dbg(adap_dev, "Detection of w83781d " "chip failed at step 2 (0x%x != " "0x%x at 0x%x)\n", val2, ~i & 0x7f, address + 5); @@ -1099,7 +1099,7 @@ w83781d_detect(struct i2c_adapter *adapt bank. */ if (kind < 0) { if (w83781d_read_value(client, W83781D_REG_CONFIG) & 0x80) { - dev_dbg(&adapter->dev, "Detection of w83781d chip " + dev_dbg(adap_dev, "Detection of w83781d chip " "failed at step 3\n"); err = -ENODEV; goto ERROR2; @@ -1110,7 +1110,7 @@ w83781d_detect(struct i2c_adapter *adapt if ((!(val1 & 0x07)) && (((!(val1 & 0x80)) && (val2 != 0xa3) && (val2 != 0xc3)) || ((val1 & 0x80) && (val2 != 0x5c) && (val2 != 0x12)))) { - dev_dbg(&adapter->dev, "Detection of w83781d chip " + dev_dbg(adap_dev, "Detection of w83781d chip " "failed at step 4\n"); err = -ENODEV; goto ERROR2; @@ -1121,7 +1121,7 @@ w83781d_detect(struct i2c_adapter *adapt ((val1 & 0x80) && (val2 == 0x5c)))) { if (w83781d_read_value (client, W83781D_REG_I2C_ADDR) != address) { - dev_dbg(&adapter->dev, "Detection of w83781d " + dev_dbg(adap_dev, "Detection of w83781d " "chip failed at step 5\n"); err = -ENODEV; goto ERROR2; @@ -1144,7 +1144,7 @@ w83781d_detect(struct i2c_adapter *adapt else if (val2 == 0x12) vendid = asus; else { - dev_dbg(&adapter->dev, "w83781d chip vendor is " + dev_dbg(adap_dev, "w83781d chip vendor is " "neither Winbond nor Asus\n"); err = -ENODEV; goto ERROR2; @@ -1164,7 +1164,7 @@ w83781d_detect(struct i2c_adapter *adapt kind = as99127f; else { if (kind == 0) - dev_warn(&adapter->dev, "Ignoring 'force' " + dev_warn(adap_dev, "Ignoring 'force' " "parameter for unknown chip at " "address 0x%02x\n", address); err = -EINVAL; --- linux-2.6.20-rc5.orig/drivers/hwmon/w83793.c 2007-01-18 14:08:17.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/w83793.c 2007-01-18 14:45:27.000000000 +0100 @@ -1265,7 +1265,8 @@ static int w83793_detect(struct i2c_adap kind = w83793; } else { if (kind == 0) - dev_warn(&adapter->dev, "w83793: Ignoring " + dev_warn(adapter->class_dev.dev, + "w83793: Ignoring " "'force' parameter for unknown chip " "at address 0x%02x\n", address); err = -ENODEV; --- linux-2.6.20-rc5.orig/drivers/hwmon/w83l785ts.c 2007-01-17 19:11:38.000000000 +0100 +++ linux-2.6.20-rc5/drivers/hwmon/w83l785ts.c 2007-01-18 14:45:27.000000000 +0100 @@ -187,7 +187,7 @@ static int w83l785ts_detect(struct i2c_a W83L785TS_REG_CONFIG, 0) & 0x80) != 0x00) || ((w83l785ts_read_value(new_client, W83L785TS_REG_TYPE, 0) & 0xFC) != 0x00)) { - dev_dbg(&adapter->dev, + dev_dbg(adapter->class_dev.dev, "W83L785TS-S detection failed at 0x%02x.\n", address); goto exit_free; @@ -212,7 +212,7 @@ static int w83l785ts_detect(struct i2c_a } if (kind <= 0) { /* identification failed */ - dev_info(&adapter->dev, + dev_info(adapter->class_dev.dev, "Unsupported chip (man_id=0x%04X, " "chip_id=0x%02X).\n", man_id, chip_id); goto exit_free;