]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (nct6775) Fix incorrect parenthesization in nct6775_write_fan_div()
authorZev Weiss <zev@bewilderbeest.net>
Mon, 2 Jan 2023 21:28:57 +0000 (13:28 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:23 +0000 (09:34 +0100)
commit22650b8e290147874afc7b707677f735a4b4d04d
tree73265f1ff7ea8406c83a99ed3ed6c6731c53ddd8
parent028c12333bca75bdb4f526adf75a8d5e4e6b36c0
hwmon: (nct6775) Fix incorrect parenthesization in nct6775_write_fan_div()

commit ad8a47eee4f3332501ed9f01e56d59000f005e9c upstream.

Commit 86ca00d3e57a ("hwmon: (nct6775) Convert register access to
regmap API") fumbled the shifting & masking of the fan_div values such
that odd-numbered fan divisors would always be set to zero.  Fix it so
that we actually OR in the bits we meant to.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Fixes: 86ca00d3e57a ("hwmon: (nct6775) Convert register access to regmap API")
Cc: stable@kernel.org # v5.19+
Link: https://lore.kernel.org/r/20230102212857.5670-1-zev@bewilderbeest.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/nct6775-core.c