hwmon: (lm90) Re-enable interrupts after alert clears
authorGuenter Roeck <linux@roeck-us.net>
Sat, 8 Jan 2022 19:37:19 +0000 (11:37 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Feb 2022 16:27:11 +0000 (17:27 +0100)
commitccdf90878b8ba53ebd7236e2edf363ae30847a4c
tree5f8d4ffcdaa550df1c32d78375d6a0bd2b97acd6
parentda20522eba44f6bdf72f755519246c30b8d172ac
hwmon: (lm90) Re-enable interrupts after alert clears

[ Upstream commit bc341a1a98827925082e95db174734fc8bd68af6 ]

If alert handling is broken, interrupts are disabled after an alert and
re-enabled after the alert clears. However, if there is an interrupt
handler, this does not apply if alerts were originally disabled and enabled
when the driver was loaded. In that case, interrupts will stay disabled
after an alert was handled though the alert handler even after the alert
condition clears. Address the situation by always re-enabling interrupts
after the alert condition clears if there is an interrupt handler.

Fixes: 2abdc357c55d9 ("hwmon: (lm90) Unmask hardware interrupt")
Cc: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/lm90.c