All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix sysfs_notify and kobject_uevent in fan_alarm_notify
@ 2019-06-17  9:33 cschneider
  2019-06-17 17:04 ` Guenter Roeck
  0 siblings, 1 reply; 8+ messages in thread
From: cschneider @ 2019-06-17  9:33 UTC (permalink / raw)
  To: linux-hwmon; +Cc: Christian Schneider, Christian Schneider

From: Christian Schneider <christian@ch-sc.de>

sysfs_notify and kobject_uevent are passed the wrong kobject.
that why notifications can't be received and uevents have the wrong path.
this patch fixes this.

Signed-off-by: Christian Schneider <cschneider@radiodata.biz>
---
 drivers/hwmon/gpio-fan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
index 84753680a4e8..76377791ff0e 100644
--- a/drivers/hwmon/gpio-fan.c
+++ b/drivers/hwmon/gpio-fan.c
@@ -54,8 +54,8 @@ 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");
-	kobject_uevent(&fan_data->dev->kobj, KOBJ_CHANGE);
+	sysfs_notify(&fan_data->hwmon_dev->kobj, NULL, "fan1_alarm");
+	kobject_uevent(&fan_data->hwmon_dev->kobj, KOBJ_CHANGE);
 }
 
 static irqreturn_t fan_alarm_irq_handler(int irq, void *dev_id)
-- 
2.17.1


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

end of thread, other threads:[~2019-06-21 14:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-17  9:33 [PATCH] Fix sysfs_notify and kobject_uevent in fan_alarm_notify cschneider
2019-06-17 17:04 ` Guenter Roeck
2019-06-19  8:47   ` Christian Schneider
2019-06-19 10:00     ` Christian Schneider
2019-06-19 19:53       ` Guenter Roeck
2019-06-21  8:30         ` Christian Schneider
2019-06-21 14:05           ` Guenter Roeck
2019-06-19 19:55     ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.