Skip to content

Commit 277c628

Browse files
Christian Schneidergroeck
authored andcommitted
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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
1 parent f2173fa commit 277c628

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/hwmon/gpio-fan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ static void fan_alarm_notify(struct work_struct *ws)
5454
struct gpio_fan_data *fan_data =
5555
container_of(ws, struct gpio_fan_data, alarm_work);
5656

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

6161
static irqreturn_t fan_alarm_irq_handler(int irq, void *dev_id)

0 commit comments

Comments
 (0)