From: Jean Delvare Date: Thu, 12 Jul 2012 20:47:37 +0000 (+0200) Subject: hwmon: (it87) Preserve configuration register bits on init X-Git-Tag: firefly_0821_release~7541^2~952 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d53c2bc79a9044090cafc82530be55d4bb144905;p=firefly-linux-kernel-4.4.55.git hwmon: (it87) Preserve configuration register bits on init commit 41002f8dd5938d5ad1d008ce5bfdbfe47fa7b4e8 upstream. We were accidentally losing one bit in the configuration register on device initialization. It was reported to freeze one specific system right away. Properly preserve all bits we don't explicitly want to change in order to prevent that. Reported-by: Stevie Trujillo Signed-off-by: Jean Delvare Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 5f5247750430..b358c87c3bca 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -2057,7 +2057,7 @@ static void __devinit it87_init_device(struct platform_device *pdev) /* Start monitoring */ it87_write_value(data, IT87_REG_CONFIG, - (it87_read_value(data, IT87_REG_CONFIG) & 0x36) + (it87_read_value(data, IT87_REG_CONFIG) & 0x3e) | (update_vbat ? 0x41 : 0x01)); }