hwmon: (g762) fix call to devm_hwmon_device_register_with_groups()
authorArnaud Ebalard <arno@natisbad.org>
Wed, 19 Nov 2014 21:52:36 +0000 (22:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2014 23:57:31 +0000 (15:57 -0800)
commit48188bcb26e58365948860f29c81aaadcd12f3ab
tree12edfea0ed450429dafc918e08947b269d04e7ef
parent8e14dcec1f787eca0daf0c9302c8583c2e4cf9fa
hwmon: (g762) fix call to devm_hwmon_device_register_with_groups()

commit 6b19b66013cfe608d63f0dab38834bbaceb0217a upstream.

g762_remove() needs to first call hwmon_device_unregister() and then
g762_of_clock_disable(). For that reason, it is not possible to
convert it to devm_hwmon_device_register_with_groups() and the
the non device managed version must be used.

This is correctly stated in commit message for 398e16db6262 ("hwmon:
(g762) Convert to hwmon_device_register_with_groups") but the
associated changes do in fact introduce a call to the device managed
version of the function.

This patch fixes that typo by switching to the non devm_ version.

Fixes: 398e16db6262 ("hwmon: (g762) Convert to hwmon_device_register_with_groups")
Signed-off-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/g762.c