linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-i2c@vger.kernel.org, Kevin Tsai <ktsai@capellamicro.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] iio: light: cm36651: convert to i2c_new_dummy_device
Date: Sat, 27 Jul 2019 20:56:40 +0100	[thread overview]
Message-ID: <20190727205640.2686db5f@archlinux> (raw)
In-Reply-To: <20190722172613.3890-2-wsa+renesas@sang-engineering.com>

On Mon, 22 Jul 2019 19:26:11 +0200
Wolfram Sang <wsa+renesas@sang-engineering.com> 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>

Hi,

Hmm. I've been rather busy recently so the IIO tree is based before this
got introduced.

Meh, it's early in the cycle so I'm just going to rebase and hope it
doesn't cause anyone too much pain.  I suspect the number of people
tracking my togreg branch is very small to 0.

Applied to a rebase version of the togreg branch of iio.git and
pushed out as testing for the autobuilders to poke at it.

Thanks,

Jonathan


> ---
> 
> Generated with coccinelle. Build tested by me and buildbot. Not tested on HW.
> 
>  drivers/iio/light/cm36651.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/iio/light/cm36651.c b/drivers/iio/light/cm36651.c
> index 7702c2bcbcfa..1019d625adb1 100644
> --- a/drivers/iio/light/cm36651.c
> +++ b/drivers/iio/light/cm36651.c
> @@ -646,18 +646,18 @@ static int cm36651_probe(struct i2c_client *client,
>  	i2c_set_clientdata(client, indio_dev);
>  
>  	cm36651->client = client;
> -	cm36651->ps_client = i2c_new_dummy(client->adapter,
> +	cm36651->ps_client = i2c_new_dummy_device(client->adapter,
>  						     CM36651_I2C_ADDR_PS);
> -	if (!cm36651->ps_client) {
> +	if (IS_ERR(cm36651->ps_client)) {
>  		dev_err(&client->dev, "%s: new i2c device failed\n", __func__);
> -		ret = -ENODEV;
> +		ret = PTR_ERR(cm36651->ps_client);
>  		goto error_disable_reg;
>  	}
>  
> -	cm36651->ara_client = i2c_new_dummy(client->adapter, CM36651_ARA);
> -	if (!cm36651->ara_client) {
> +	cm36651->ara_client = i2c_new_dummy_device(client->adapter, CM36651_ARA);
> +	if (IS_ERR(cm36651->ara_client)) {
>  		dev_err(&client->dev, "%s: new i2c device failed\n", __func__);
> -		ret = -ENODEV;
> +		ret = PTR_ERR(cm36651->ara_client);
>  		goto error_i2c_unregister_ps;
>  	}
>  


  reply	other threads:[~2019-07-27 19:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22 17:26 [PATCH 0/3] iio: convert subsystem to i2c_new_dummy_device() Wolfram Sang
2019-07-22 17:26 ` [PATCH 1/3] iio: light: cm36651: convert to i2c_new_dummy_device Wolfram Sang
2019-07-27 19:56   ` Jonathan Cameron [this message]
2019-07-22 17:26 ` [PATCH 2/3] iio: light: veml6070: " Wolfram Sang
2019-07-27 19:58   ` Jonathan Cameron
2019-07-22 17:26 ` [PATCH 3/3] iio: pressure: hp03: " Wolfram Sang
2019-07-27 19:59   ` Jonathan Cameron

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=20190727205640.2686db5f@archlinux \
    --to=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=ktsai@capellamicro.com \
    --cc=lars@metafoo.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).