]> www.infradead.org Git - users/dwmw2/linux.git/commit
hwmon: (lm75) Fixup tmp75b clr_mask
authorIker Perez del Palomar Sustatxa <iker.perez@codethink.co.uk>
Thu, 1 Aug 2019 07:53:24 +0000 (08:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Aug 2019 08:11:09 +0000 (10:11 +0200)
commitace146b613fdd83ca76b8bda817b0099ce6f7398
tree3013d7558df85d36facdb5b5c1815b23c4f0130d
parent4dfe9926b86c7c913d52a4ab871e4bb2606b5a30
hwmon: (lm75) Fixup tmp75b clr_mask

commit a95a4f3f2702b55a89393bf0f1b2b3d79e0f7da2 upstream.

The configuration register of the tmp75b sensor is 16bit long, however
the first byte is reserved, so there is not no need to take care of it.

Because the order of the bytes is little endian and it is only necessary
to write one byte, the desired bits must be shifted into a 8 bit range.

Fixes: 39abe9d88b30 ("hwmon: (lm75) Add support for TMP75B")
Cc: stable@vger.kernel.org
Signed-off-by: Iker Perez del Palomar Sustatxa <iker.perez@codethink.co.uk>
Link: https://lore.kernel.org/r/20190801075324.4638-1-iker.perez@codethink.co.uk
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/lm75.c