From: Cosmin Tanislav <demonsingur@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: cosmin.tanislav@analog.com, demonsingur@gmail.com,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 8/8] hwmon: (adt7x10) Use hwmon_notify_event
Date: Tue, 21 Dec 2021 23:04:38 +0200 [thread overview]
Message-ID: <20211221210438.2637430-9-demonsingur@gmail.com> (raw)
In-Reply-To: <20211221210438.2637430-1-demonsingur@gmail.com>
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
prev parent reply other threads:[~2021-12-21 21:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-21 21:04 [PATCH v2 0/8] Refactor ADT7X10 Cosmin Tanislav
2021-12-21 21:04 ` [PATCH v2 1/8] hwmon: (adt7410) Pass name to core driver Cosmin Tanislav
2021-12-21 21:47 ` Guenter Roeck
2021-12-21 21:04 ` [PATCH v2 2/8] hwmon: (adt7x10) Store bus_dev in private data Cosmin Tanislav
2021-12-21 21:04 ` [PATCH v2 3/8] hwmon: (adt7x10) Add device managed action for restoring config Cosmin Tanislav
2021-12-21 21:04 ` [PATCH v2 4/8] hwmon: (adt7x10) Use devm_hwmon_device_register_with_info Cosmin Tanislav
2021-12-21 21:59 ` Guenter Roeck
2021-12-21 21:04 ` [PATCH v2 5/8] hwmon: (adt7x10) Use devm_request_threaded_irq Cosmin Tanislav
2021-12-21 21:04 ` [PATCH v2 6/8] hwmon: (adt7x10) Remove empty driver removal callback Cosmin Tanislav
2021-12-21 21:04 ` [PATCH v2 7/8] hwmon: (adt7x10) Pass hwinfo dev to irq handler Cosmin Tanislav
2021-12-21 21:04 ` Cosmin Tanislav [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211221210438.2637430-9-demonsingur@gmail.com \
--to=demonsingur@gmail.com \
--cc=cosmin.tanislav@analog.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).