]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
hwmon: (raspberrypi) Use generic notification mechanism
authorArmin Wolf <W_Armin@gmx.de>
Sun, 5 Sep 2021 19:00:49 +0000 (21:00 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 12 Oct 2021 14:22:37 +0000 (07:22 -0700)
Use hwmon_notify_event() to make the code easier to
understand and to also generate udev events.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20210905190049.11381-1-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/raspberrypi-hwmon.c

index 805d396aa81b0feba50850521b1288d757545a03..573f53d529121803e9a4a892d9e998c2f6210f38 100644 (file)
@@ -53,7 +53,7 @@ static void rpi_firmware_get_throttled(struct rpi_hwmon_data *data)
        else
                dev_info(data->hwmon_dev, "Voltage normalised\n");
 
-       sysfs_notify(&data->hwmon_dev->kobj, NULL, "in0_lcrit_alarm");
+       hwmon_notify_event(data->hwmon_dev, hwmon_in, hwmon_in_lcrit_alarm, 0);
 }
 
 static void get_values_poll(struct work_struct *work)