diff mbox

w83627hf.c removed deprecated

Message ID fd80e0df-cf35-fcfc-4d9d-fd6351f79b69@isd.net (mailing list archive)
State Rejected
Headers show

Commit Message

Chris Sorenson June 21, 2017, 9:08 p.m. UTC
Replaces a call to deprecated function hwmon_device_register() -----

Signed-off-by: Chris Sorenson <csoren@isd.net>

Changed to call hwmon_device_register_with_info() instead of
hwmon_device_register(), which is deprecated.

modified:   drivers/hwmon/w83627hf.c

                 err = PTR_ERR(data->hwmon_dev);
                 goto error;


--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Guenter Roeck June 21, 2017, 9:56 p.m. UTC | #1
On Wed, Jun 21, 2017 at 04:08:03PM -0500, Chris Sorenson wrote:
> Replaces a call to deprecated function hwmon_device_register() -----
> 
> Signed-off-by: Chris Sorenson <csoren@isd.net>
> 
> Changed to call hwmon_device_register_with_info() instead of
> hwmon_device_register(), which is deprecated.
> 
> modified:   drivers/hwmon/w83627hf.c
> 
> diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c
> index 8ac89d0..fbc5d18 100644
> --- a/drivers/hwmon/w83627hf.c
> +++ b/drivers/hwmon/w83627hf.c
> @@ -1569,7 +1569,8 @@ static int w83627hf_probe(struct platform_device
> *pdev)
>                         goto error;
>         }
> 
> -       data->hwmon_dev = hwmon_device_register(dev);
> +       data->hwmon_dev =
> +               hwmon_device_register_with_info(dev, NULL, NULL, NULL,
> NULL);
>         if (IS_ERR(data->hwmon_dev)) {
>                 err = PTR_ERR(data->hwmon_dev);
>                 goto error;
> 

I'd rather have the deprecated message instead of a hack bypassing it.
Also, a real conversion to the new API is in the works for this driver.

So, thanks but no thanks. Let's wait for the real conversion.

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c
index 8ac89d0..fbc5d18 100644
--- a/drivers/hwmon/w83627hf.c
+++ b/drivers/hwmon/w83627hf.c
@@ -1569,7 +1569,8 @@  static int w83627hf_probe(struct platform_device
*pdev)
                         goto error;
         }

-       data->hwmon_dev = hwmon_device_register(dev);
+       data->hwmon_dev =
+               hwmon_device_register_with_info(dev, NULL, NULL, NULL,
NULL);
         if (IS_ERR(data->hwmon_dev)) {