Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Peter Rosin <peda@axentia.se>,
	Lars-Peter Clausen <lars@metafoo.de>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH 4/4] iio: potentiometer: mcp4018: Use i2c_get_match_data
Date: Thu, 20 Jul 2023 20:17:01 +0100	[thread overview]
Message-ID: <20230720201701.0fb3a948@jic23-huawei> (raw)
In-Reply-To: <OS0PR01MB592223598B7DECC648947436863AA@OS0PR01MB5922.jpnprd01.prod.outlook.com>

On Sun, 16 Jul 2023 18:10:13 +0000
Biju Das <biju.das.jz@bp.renesas.com> wrote:

> Hi All,
> 
> I would like to drop this patch, as this driver does not have similar
> I2C and DT-based matching table.

Could make it so they do ;)

Jonathan

> 
> Cheers,
> Biju
> 
> > -----Original Message-----
> > From: Biju Das <biju.das.jz@bp.renesas.com>
> > Sent: Sunday, July 16, 2023 6:52 PM
> > To: Peter Rosin <peda@axentia.se>; Jonathan Cameron <jic23@kernel.org>
> > Cc: Biju Das <biju.das.jz@bp.renesas.com>; Lars-Peter Clausen
> > <lars@metafoo.de>; linux-iio@vger.kernel.org; Geert Uytterhoeven
> > <geert+renesas@glider.be>; Prabhakar Mahadev Lad <prabhakar.mahadev-  
> > lad.rj@bp.renesas.com>; linux-renesas-soc@vger.kernel.org  
> > Subject: [PATCH 4/4] iio: potentiometer: mcp4018: Use i2c_get_match_data
> > 
> > Replace of_device_get_match_data() and i2c_match_id() by i2c_get_match
> > _data() as we have similar I2C and DT-based matching table.
> > 
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> >  drivers/iio/potentiometer/mcp4018.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/iio/potentiometer/mcp4018.c
> > b/drivers/iio/potentiometer/mcp4018.c
> > index 89daecc90305..a5d902845a1c 100644
> > --- a/drivers/iio/potentiometer/mcp4018.c
> > +++ b/drivers/iio/potentiometer/mcp4018.c
> > @@ -157,9 +157,9 @@ static int mcp4018_probe(struct i2c_client *client)
> >  	i2c_set_clientdata(client, indio_dev);
> >  	data->client = client;
> > 
> > -	data->cfg = device_get_match_data(dev);
> > +	data->cfg = i2c_get_match_data(dev);
> >  	if (!data->cfg)
> > -		data->cfg = &mcp4018_cfg[i2c_match_id(mcp4018_id, client)-  
> > >driver_data];  
> > +		return -ENODEV;
> > 
> >  	indio_dev->info = &mcp4018_info;
> >  	indio_dev->channels = &mcp4018_channel;
> > --
> > 2.25.1  
> 


  reply	other threads:[~2023-07-20 19:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-16 17:52 [PATCH 0/4] Use i2c_get_match_data() Biju Das
2023-07-16 17:52 ` [PATCH 1/4] iio: accel: adxl355: Simplify probe() Biju Das
2023-07-17  8:10   ` Geert Uytterhoeven
2023-07-17  8:15   ` Puranjay Mohan
2023-07-22 16:25   ` Jonathan Cameron
2023-07-16 17:52 ` [PATCH 2/4] iio: accel: adxl313: Use i2c_get_match_data Biju Das
2023-07-17  8:52   ` Geert Uytterhoeven
2023-07-22 16:28   ` Jonathan Cameron
2023-07-22 17:37     ` Biju Das
2023-07-16 17:52 ` [PATCH 3/4] iio: potentiometer: mcp4531: " Biju Das
2023-07-16 18:09   ` Biju Das
2023-07-16 17:52 ` [PATCH 4/4] iio: potentiometer: mcp4018: " Biju Das
2023-07-16 18:10   ` Biju Das
2023-07-20 19:17     ` Jonathan Cameron [this message]
2023-07-20 19:31       ` Biju Das

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=20230720201701.0fb3a948@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=peda@axentia.se \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.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