hwmon: (lm90) Use worker for alarm notifications
authorGuenter Roeck <linux@roeck-us.net>
Wed, 29 Jun 2022 15:26:20 +0000 (08:26 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 13 Jul 2022 15:39:17 +0000 (08:39 -0700)
commit5993b9887ac3b80fba78e1a488ac748d6e4429c1
tree7f9225e97d5eec67cdfcfe20087bb0cc3498dc0c
parent8f9eb10ff71d8e3beeee3f8d19050223600faf85
hwmon: (lm90) Use worker for alarm notifications

Reporting alarms using hwmon_notify_event() may result in a callback
from the thermal subsystem. This means that such notifications must
not hold the update lock to avoid a deadlock. To avoid this situation,
use a worker to handle notifications.

Reported-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Fixes: f6d0775119fb ("hwmon: (lm90) Rework alarm/status handling")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/lm90.c