From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F527C41514 for ; Sat, 27 Jul 2019 19:56:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0A91E208E4 for ; Sat, 27 Jul 2019 19:56:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564257407; bh=CGf2yeOtB5OppLv91IleKJBexkBJqF5tbvujn6zHJ6k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=cGFtVnCQ+l4szbP3g59TNPco3YvtIzYhsWVxY5PfdxW+492qvzbzVawIeyN7jswpM xLsSZ8NUJbeizgCRYyOo5IZkF4b1x3SCuW12KKzVijrCLjpB9qsCOL7QbOKOIl6Soq szbldxUXkcZcZBr14VVhCSm/4Eqve7RdlrPQIVr4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388116AbfG0T4q (ORCPT ); Sat, 27 Jul 2019 15:56:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:41766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388004AbfG0T4q (ORCPT ); Sat, 27 Jul 2019 15:56:46 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C66272083B; Sat, 27 Jul 2019 19:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564257405; bh=CGf2yeOtB5OppLv91IleKJBexkBJqF5tbvujn6zHJ6k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=aOv8MxEtvpMMK6M9IOLoVkGdCrLbYDJA0n3cbtmC0v8JNWULBbXiv5DWOGzJuU5UM 9C49qcxQyXzqd7k5IDK9sDkmDLAshGyJ/DWTtNhOZ3xrD6PM5NFFMB+yZHJ6lCijt2 azLW6f4v6MSYAcDPgyM48NZ8lNyLNrxbbgp/RWr4= Date: Sat, 27 Jul 2019 20:56:40 +0100 From: Jonathan Cameron To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, Kevin Tsai , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] iio: light: cm36651: convert to i2c_new_dummy_device Message-ID: <20190727205640.2686db5f@archlinux> In-Reply-To: <20190722172613.3890-2-wsa+renesas@sang-engineering.com> References: <20190722172613.3890-1-wsa+renesas@sang-engineering.com> <20190722172613.3890-2-wsa+renesas@sang-engineering.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Mon, 22 Jul 2019 19:26:11 +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 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; > } >