Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3300fb4f authored by Jean Delvare's avatar Jean Delvare Committed by Jean Delvare
Browse files

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: default avatarJean Delvare <khali@linux-fr.org>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Cc: stable@vger.kernel.org
parent 3d70f8c6
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -2083,6 +2083,7 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev)
	mutex_init(&data->lock);
	mutex_init(&data->lock);
	mutex_init(&data->update_lock);
	mutex_init(&data->update_lock);
	data->name = w83627ehf_device_names[sio_data->kind];
	data->name = w83627ehf_device_names[sio_data->kind];
	data->bank = 0xff;		/* Force initial bank selection */
	platform_set_drvdata(pdev, data);
	platform_set_drvdata(pdev, data);


	/* 627EHG and 627EHF have 10 voltage inputs; 627DHG and 667HG have 9 */
	/* 627EHG and 627EHF have 10 voltage inputs; 627DHG and 667HG have 9 */