summaryrefslogtreecommitdiff
path: root/drivers/hwmon/gpio-fan.c
diff options
context:
space:
mode:
authorChristian Schneider <cschneider@radiodata.biz>2019-07-02 15:23:38 +0200
committerGuenter Roeck <linux@roeck-us.net>2019-07-08 18:11:32 -0700
commit277c628fa5acf363b73cdd3793700dc575a988c0 (patch)
tree5158202c2b760953837ba280abcf92bba6b19493 /drivers/hwmon/gpio-fan.c
parentf2173fa2246e906602c6286c7dade68109d68976 (diff)
hwmon: (gpio-fan) fix sysfs notifications and udev events for gpio-fan alarms
sysfs_notify() and kobject_uevent() are passed the wrong device. fan_data->hwmon_dev needs to be passed, so that sysfs notification goes to right place and generated uevent has the right information Signed-off-by: Christian Schneider <cschneider@radiodata.biz> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/gpio-fan.c')
-rw-r--r--drivers/hwmon/gpio-fan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
index 5f9b406134b5..3ea4021f267c 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)