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>
This commit is contained in:
Christian Schneider 2019-07-02 15:23:38 +02:00 коммит произвёл Guenter Roeck
Родитель f2173fa224
Коммит 277c628fa5
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -54,8 +54,8 @@ static void fan_alarm_notify(struct work_struct *ws)
struct gpio_fan_data *fan_data = struct gpio_fan_data *fan_data =
container_of(ws, struct gpio_fan_data, alarm_work); 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); kobject_uevent(&fan_data->hwmon_dev->kobj, KOBJ_CHANGE);
} }
static irqreturn_t fan_alarm_irq_handler(int irq, void *dev_id) static irqreturn_t fan_alarm_irq_handler(int irq, void *dev_id)