diff mbox series

hwmon: (raspberrypi) Use generic notification mechanism

Message ID 20210905190049.11381-1-W_Armin@gmx.de (mailing list archive)
State Accepted
Headers show
Series hwmon: (raspberrypi) Use generic notification mechanism | expand

Commit Message

Armin Wolf Sept. 5, 2021, 7 p.m. UTC
From: Armin Wolf <W_Armin@gmx.de>

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>
---
 drivers/hwmon/raspberrypi-hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.20.1

Comments

Guenter Roeck Sept. 5, 2021, 8:33 p.m. UTC | #1
On Sun, Sep 05, 2021 at 09:00:49PM +0200, W_Armin@gmx.de wrote:
> From: Armin Wolf <W_Armin@gmx.de>
> 
> 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>

Applied to hwmon-next.

Thanks,
Guenter
diff mbox series

Patch

diff --git a/drivers/hwmon/raspberrypi-hwmon.c b/drivers/hwmon/raspberrypi-hwmon.c
index 805d396aa81b..573f53d52912 100644
--- a/drivers/hwmon/raspberrypi-hwmon.c
+++ b/drivers/hwmon/raspberrypi-hwmon.c
@@ -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)