All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-i2c@vger.kernel.org, Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] hwmon: smm665: convert to i2c_new_dummy_device
Date: Mon, 22 Jul 2019 11:29:08 -0700	[thread overview]
Message-ID: <20190722182908.GA16788@roeck-us.net> (raw)
In-Reply-To: <20190722172611.3797-3-wsa+renesas@sang-engineering.com>

On Mon, Jul 22, 2019 at 07:26:09PM +0200, Wolfram Sang wrote:
> Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an
> ERRPTR which we use in error handling.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied to hwmon-next.

Thanks,
Guenter

> ---
> 
> Generated with coccinelle. Build tested by me and buildbot. Not tested on HW.
> 
>  drivers/hwmon/smm665.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/hwmon/smm665.c b/drivers/hwmon/smm665.c
> index d8c91c2cb8cf..6eff14fe395d 100644
> --- a/drivers/hwmon/smm665.c
> +++ b/drivers/hwmon/smm665.c
> @@ -586,10 +586,10 @@ static int smm665_probe(struct i2c_client *client,
>  
>  	data->client = client;
>  	data->type = id->driver_data;
> -	data->cmdreg = i2c_new_dummy(adapter, (client->addr & ~SMM665_REGMASK)
> +	data->cmdreg = i2c_new_dummy_device(adapter, (client->addr & ~SMM665_REGMASK)
>  				     | SMM665_CMDREG_BASE);
> -	if (!data->cmdreg)
> -		return -ENOMEM;
> +	if (IS_ERR(data->cmdreg))
> +		return PTR_ERR(data->cmdreg);
>  
>  	switch (data->type) {
>  	case smm465:

  reply	other threads:[~2019-07-22 18:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22 17:26 [PATCH 0/3] hwmon: convert subsystem to i2c_new_dummy_device() Wolfram Sang
2019-07-22 17:26 ` [PATCH 1/3] hwmon: asb100: convert to i2c_new_dummy_device Wolfram Sang
2019-07-22 18:28   ` Guenter Roeck
2019-07-22 17:26 ` [PATCH 2/3] hwmon: smm665: " Wolfram Sang
2019-07-22 18:29   ` Guenter Roeck [this message]
2019-07-22 17:26 ` [PATCH 3/3] hwmon: w83781d: " Wolfram Sang
2019-07-22 18:30   ` Guenter Roeck

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=20190722182908.GA16788@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.