* [PATCH] hwmon: w83795: Convert to hwmon_device_register_with_info()
@ 2018-07-03 19:35 Aleksei Mamlin
2018-07-03 19:59 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Aleksei Mamlin @ 2018-07-03 19:35 UTC (permalink / raw)
To: Jean Delvare; +Cc: Guenter Roeck, linux-hwmon, linux-kernel, Aleksei Mamlin
This patch replaces deprecated call to hwmon_device_register() with the new
hwmon_device_register_with_info().
Signed-off-by: Aleksei Mamlin <mamlinav@gmail.com>
---
drivers/hwmon/w83795.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c
index 49276bbdac3d..25bcf988ef1c 100644
--- a/drivers/hwmon/w83795.c
+++ b/drivers/hwmon/w83795.c
@@ -2234,7 +2234,8 @@ static int w83795_probe(struct i2c_client *client,
if (data->chip_type == w83795g)
w83795_check_dynamic_in_limits(client);
- data->hwmon_dev = hwmon_device_register(dev);
+ data->hwmon_dev = hwmon_device_register_with_info(dev, client->name,
+ data, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) {
err = PTR_ERR(data->hwmon_dev);
goto exit_remove;
--
2.16.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] hwmon: w83795: Convert to hwmon_device_register_with_info()
2018-07-03 19:35 [PATCH] hwmon: w83795: Convert to hwmon_device_register_with_info() Aleksei Mamlin
@ 2018-07-03 19:59 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2018-07-03 19:59 UTC (permalink / raw)
To: Aleksei Mamlin; +Cc: Jean Delvare, linux-hwmon, linux-kernel
On Tue, Jul 03, 2018 at 10:35:15PM +0300, Aleksei Mamlin wrote:
> This patch replaces deprecated call to hwmon_device_register() with the new
> hwmon_device_register_with_info().
>
> Signed-off-by: Aleksei Mamlin <mamlinav@gmail.com>
NACK. This doesn't really convert anything, it just exploits a loophole
that was necessary because some drivers can not be converted cleanly.
Guenter
> ---
> drivers/hwmon/w83795.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c
> index 49276bbdac3d..25bcf988ef1c 100644
> --- a/drivers/hwmon/w83795.c
> +++ b/drivers/hwmon/w83795.c
> @@ -2234,7 +2234,8 @@ static int w83795_probe(struct i2c_client *client,
> if (data->chip_type == w83795g)
> w83795_check_dynamic_in_limits(client);
>
> - data->hwmon_dev = hwmon_device_register(dev);
> + data->hwmon_dev = hwmon_device_register_with_info(dev, client->name,
> + data, NULL, NULL);
> if (IS_ERR(data->hwmon_dev)) {
> err = PTR_ERR(data->hwmon_dev);
> goto exit_remove;
> --
> 2.16.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-03 19:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-03 19:35 [PATCH] hwmon: w83795: Convert to hwmon_device_register_with_info() Aleksei Mamlin
2018-07-03 19:59 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox