]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
hwmon: (w83627ehf) Force initial bank selection
authorJean Delvare <khali@linux-fr.org>
Mon, 5 Nov 2012 20:54:39 +0000 (21:54 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 16 Nov 2012 16:47:09 +0000 (16:47 +0000)
commit 3300fb4f88688029fff8dfb9ec0734f6e4cba3e7 upstream.

Don't assume bank 0 is selected at device probe time. This may not be
the case. Force bank selection at first register access to guarantee
that we read the right registers upon driver loading.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/hwmon/w83627ehf.c

index ceaec92e91b49e6e6cfc0fe709f3bae2045ba4db..b6a3ce3903c664a7f71ffbe484e6918aefd17f42 100644 (file)
@@ -2015,6 +2015,7 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev)
        mutex_init(&data->lock);
        mutex_init(&data->update_lock);
        data->name = w83627ehf_device_names[sio_data->kind];
+       data->bank = 0xff;              /* Force initial bank selection */
        platform_set_drvdata(pdev, data);
 
        /* 627EHG and 627EHF have 10 voltage inputs; 627DHG and 667HG have 9 */