diff options
author | Arnaud Ebalard <arno@natisbad.org> | 2014-11-19 22:52:36 +0100 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2014-11-19 14:06:47 -0800 |
commit | 6b19b66013cfe608d63f0dab38834bbaceb0217a (patch) | |
tree | 34e6c25de4e100187517cc5dcdb6bf8031125536 /drivers/hwmon | |
parent | fc14f9c1272f62c3e8d01300f52467c0d9af50f9 (diff) |
hwmon: (g762) fix call to devm_hwmon_device_register_with_groups()
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")
Cc: stable@vger.kernel.org (3.17+)
Signed-off-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/g762.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/hwmon/g762.c b/drivers/hwmon/g762.c index 6aac695b1688..9b55e673b67c 100644 --- a/drivers/hwmon/g762.c +++ b/drivers/hwmon/g762.c @@ -1084,10 +1084,8 @@ static int g762_probe(struct i2c_client *client, const struct i2c_device_id *id) if (ret) goto clock_dis; - data->hwmon_dev = devm_hwmon_device_register_with_groups(dev, - client->name, - data, - g762_groups); + data->hwmon_dev = hwmon_device_register_with_groups(dev, client->name, + data, g762_groups); if (IS_ERR(data->hwmon_dev)) { ret = PTR_ERR(data->hwmon_dev); goto clock_dis; |