]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
hwmon: (w83627hf) Don't touch nonexistent I2C address registers
authorJean Delvare <khali@linux-fr.org>
Wed, 19 Dec 2012 21:17:00 +0000 (22:17 +0100)
committerJean Delvare <khali@endymion.delvare>
Wed, 19 Dec 2012 21:17:00 +0000 (22:17 +0100)
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 <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/w83627hf.c

index 9170746e9743eb537dbd0ed6d87a1b52671b0c3d..81f486520cea604e928535c04e84ec5d99c6831b 100644 (file)
@@ -1732,8 +1732,10 @@ static void 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) {