[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211221123944.2683245-10-demonsingur@gmail.com>
Date: Tue, 21 Dec 2021 14:39:44 +0200
From: Cosmin Tanislav <demonsingur@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: cosmin.tanislav@...log.com, demonsingur@...il.com,
Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>,
linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v1 10/10] hwmon: adt7x10: use hwmon_notify_event
From: Cosmin Tanislav <cosmin.tanislav@...log.com>
The hwmon subsystem provides means of notifying userspace
about events. Use it.
Signed-off-by: Cosmin Tanislav <cosmin.tanislav@...log.com>
---
drivers/hwmon/adt7x10.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/hwmon/adt7x10.c b/drivers/hwmon/adt7x10.c
index c03805c72906..1a99989a744d 100644
--- a/drivers/hwmon/adt7x10.c
+++ b/drivers/hwmon/adt7x10.c
@@ -111,11 +111,11 @@ static irqreturn_t adt7x10_irq_handler(int irq, void *private)
return IRQ_HANDLED;
if (status & ADT7X10_STAT_T_HIGH)
- sysfs_notify(&dev->kobj, NULL, "temp1_max_alarm");
+ hwmon_notify_event(hdev, hwmon_temp, hwmon_temp_max_alarm, 0);
if (status & ADT7X10_STAT_T_LOW)
- sysfs_notify(&dev->kobj, NULL, "temp1_min_alarm");
+ hwmon_notify_event(hdev, hwmon_temp, hwmon_temp_min_alarm, 0);
if (status & ADT7X10_STAT_T_CRIT)
- sysfs_notify(&dev->kobj, NULL, "temp1_crit_alarm");
+ hwmon_notify_event(hdev, hwmon_temp, hwmon_temp_crit_alarm, 0);
return IRQ_HANDLED;
}
--
2.34.1
Powered by blists - more mailing lists