From: Jean Delvare Date: Tue, 13 Nov 2012 23:31:27 +0000 (+1100) Subject: hwmon: (w83627hf) Don't touch nonexistent I2C address registers X-Git-Tag: next-20121114~83^2~11 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=49ed3013123e60c4f8f1556bc84722bfda4c716f;p=karo-tx-linux.git hwmon: (w83627hf) Don't touch nonexistent I2C address registers Only the W83627HF could be accessed through I2C. All other supported chips are LPC-only, so they do not have I2C address registers. Don't write to nonexistent or reserved registers on these chips. Signed-off-by: Jean Delvare Acked-by: Guenter Roeck --- diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c index b8851f76265d..060d4ce8047a 100644 --- a/drivers/hwmon/w83627hf.c +++ b/drivers/hwmon/w83627hf.c @@ -1732,8 +1732,10 @@ static void __devinit w83627hf_init_device(struct platform_device *pdev) /* Minimize conflicts with other winbond i2c-only clients... */ /* disable i2c subclients... how to disable main i2c client?? */ /* force i2c address to relatively uncommon address */ - w83627hf_write_value(data, W83781D_REG_I2C_SUBADDR, 0x89); - w83627hf_write_value(data, W83781D_REG_I2C_ADDR, force_i2c); + if (type == w83627hf) { + w83627hf_write_value(data, W83781D_REG_I2C_SUBADDR, 0x89); + w83627hf_write_value(data, W83781D_REG_I2C_ADDR, force_i2c); + } /* Read VID only once */ if (type == w83627hf || type == w83637hf) {