Linux-Hwmon Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] hwmon, gpio-fan: fix that sysfs_notify in void fan_alarm_notify is not received in userspace
@ 2019-06-14 13:52 Christian Schneider
  2019-06-14 14:05 ` Guenter Roeck
  0 siblings, 1 reply; 8+ messages in thread
From: Christian Schneider @ 2019-06-14 13:52 UTC (permalink / raw)
  To: linux-hwmon

From: Christian Schneider <cschneider@radiodata.biz>
   To: linux-hwmon
Alarms on gpio-fan can't be received from sysfs_notify, because the 
wrong kobject is passed.
This patch fixes this.
Signed-off-by: Christian Schneider <cschneider@radiodata.biz>
---
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
index 84753680a4e8..5f3a35db18a1 100644
--- a/drivers/hwmon/gpio-fan.c
+++ b/drivers/hwmon/gpio-fan.c
@@ -54,7 +54,7 @@ static void fan_alarm_notify(struct work_struct *ws)
         struct gpio_fan_data *fan_data =
                 container_of(ws, struct gpio_fan_data, alarm_work);

-       sysfs_notify(&fan_data->dev->kobj, NULL, "fan1_alarm");
+       sysfs_notify(&fan_data->hwmon_dev->kobj, NULL, "fan1_alarm");
         kobject_uevent(&fan_data->dev->kobj, KOBJ_CHANGE);
  }

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, back to index

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-14 13:52 [PATCH] hwmon, gpio-fan: fix that sysfs_notify in void fan_alarm_notify is not received in userspace Christian Schneider
2019-06-14 14:05 ` Guenter Roeck
2019-06-14 14:16   ` Christian Schneider
2019-06-14 14:52     ` Guenter Roeck
2019-06-14 15:35       ` [PATCHv2] " Christian Schneider
2019-06-15 13:17         ` Guenter Roeck
2019-06-17  9:36           ` Christian Schneider
2019-06-14 15:37       ` [PATCH] " Christian Schneider

Linux-Hwmon Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-hwmon/0 linux-hwmon/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-hwmon linux-hwmon/ https://lore.kernel.org/linux-hwmon \
		linux-hwmon@vger.kernel.org linux-hwmon@archiver.kernel.org
	public-inbox-index linux-hwmon


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-hwmon


AGPL code for this site: git clone https://public-inbox.org/ public-inbox