diff options
author | Guenter Roeck <linux@roeck-us.net> | 2021-11-06 10:02:44 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-29 11:50:30 +0100 |
commit | f20c86f5d161f9a75b12530caa4590c0cf9536cd (patch) | |
tree | 503ea0f389652784474f013a018f6e3ad34986a1 /drivers/hwmon/lm75.c | |
parent | 28f64994c48bfcfb0d5077867d466234ad55c748 (diff) |
hwmon: (lm90) Fix usage of CONFIG2 register in detect function
[ Upstream commit fce15c45d3fbd9fc1feaaf3210d8e3f8b33dfd3a ]
The detect function had a comment "Make compiler happy" when id did not
read the second configuration register. As it turns out, the code was
checking the contents of this register for manufacturer ID 0xA1 (NXP
Semiconductor/Philips), but never actually read the register. So it
wasn't surprising that the compiler complained, and it indeed had a point.
Fix the code to read the register contents for manufacturer ID 0xa1.
At the same time, the code was reading the register for manufacturer ID
0x41 (Analog Devices), but it was not using the results. In effect it was
just checking if reading the register returned an error. That doesn't
really add much if any value, so stop doing that.
Fixes: f90be42fb383 ("hwmon: (lm90) Refactor reading of config2 register")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/hwmon/lm75.c')
0 files changed, 0 insertions, 0 deletions