public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Aleksei Mamlin <mamlinav@gmail.com>
Cc: Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: w83795: Convert to hwmon_device_register_with_info()
Date: Tue, 3 Jul 2018 12:59:05 -0700	[thread overview]
Message-ID: <20180703195905.GA14558@roeck-us.net> (raw)
In-Reply-To: <20180703193515.4379-1-mamlinav@gmail.com>

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
> 

      reply	other threads:[~2018-07-03 19:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180703195905.GA14558@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mamlinav@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox