hwmon: Ensure that 'dev' passed to hwmon_notify_event() is a hwmon device

The device parameter of hwmon_notify_event() must be a hardware monitoring
device. Since this is easy to get wrong, and since passing a non-hwmon
device may result in a crash, generate a warning traceback and abort if
a wrong device class is passed as parameter.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
Guenter Roeck 2026-08-20 22:19:13 -07:00
commit 2bf98a6af1