From: Jean Delvare Date: Mon, 5 Nov 2012 22:54:43 +0000 (+1100) Subject: hwmon: (w83627ehf) Force initial bank selection X-Git-Tag: next-20121106~79^2~15 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d5dd6206537f11c3b637b574a15466742ea35062;p=karo-tx-linux.git hwmon: (w83627ehf) Force initial bank selection 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 Reviewed-by: Guenter Roeck Cc: stable@vger.kernel.org --- diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index 1821b7423d5b..de3c7e04c3b5 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c @@ -2083,6 +2083,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 */