summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/w83627ehf.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2012-11-05 21:54:39 +0100
committerJean Delvare <khali@endymion.delvare>2012-11-05 21:54:39 +0100
commit3300fb4f88688029fff8dfb9ec0734f6e4cba3e7 (patch)
treeeaac7eae44336995c7ccecffb62b4af5dc5cd00c /drivers/hwmon/w83627ehf.c
parent3d70f8c617a436c7146ecb81df2265b4626dfe89 (diff)
downloadblackbird-op-linux-3300fb4f88688029fff8dfb9ec0734f6e4cba3e7.tar.gz
blackbird-op-linux-3300fb4f88688029fff8dfb9ec0734f6e4cba3e7.zip
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 <khali@linux-fr.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/hwmon/w83627ehf.c')
-rw-r--r--drivers/hwmon/w83627ehf.c1
1 files changed, 1 insertions, 0 deletions
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 */
OpenPOWER on IntegriCloud