lkml.org 
[lkml]   [2021]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 7/7] hwmon: (adt7x10) Use hwmon_notify_event
Date
From: Cosmin Tanislav <cosmin.tanislav@analog.com>

The hwmon subsystem provides means of notifying userspace
about events. Use it.

Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.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 964cbe43de46..994160bd8901 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
\
 
 \ /
  Last update: 2021-12-21 22:59    [W:0.074 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site