hwmon: (gpio-fan) move fan_alarm_init after devm_hwmon_device_register_with_groups
authorChristian Schneider <cschneider@radiodata.biz>
Tue, 2 Jul 2019 13:23:37 +0000 (15:23 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 9 Jul 2019 01:11:31 +0000 (18:11 -0700)
commitf2173fa2246e906602c6286c7dade68109d68976
tree26c2b089a18e4aeabc10a9c27a5d8644d1831d4f
parent7a1d220ccb0cc2b808eb176fb05bf55a38179f3f
hwmon: (gpio-fan) move fan_alarm_init after devm_hwmon_device_register_with_groups

This makes it possible to use the hwmon_dev in fan_alarm_notify(). Otherwise
it would be possible, that a interupt arrives and fan_alarm_notify() is
executed, before hwmon_dev is initialized.

Signed-off-by: Christian Schneider <cschneider@radiodata.biz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/gpio-fan.c