Re: [PATCH] iio: Switch i2c drivers back to use .probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Sun, May 21, 2023 at 06:56:25PM +0100, Jonathan Cameron wrote:
> On Sat, 20 May 2023 19:13:00 +0200
> Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
> 
> > Hello Jonathan,
> > 
> > On Sat, May 20, 2023 at 04:43:40PM +0100, Jonathan Cameron wrote:
> > > On Mon, 15 May 2023 22:50:48 +0200
> > > Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
> > >   
> > > > After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
> > > > call-back type"), all drivers being converted to .probe_new() and then
> > > > 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
> > > > back to (the new) .probe() to be able to eventually drop .probe_new() from
> > > > struct i2c_driver.
> > > > 
> > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>  
> > > Some fuzz due to other patches being queued up already, but otherwise
> > > LGTM and applied to the togreg branch of iio.git which is initially pushed
> > > out as testing for 0-day to give it a whirl.  
> > 
> > Looks good, thanks!
> > 
> > Your tree has a few new drivers that still use .probe_new(). To convert
> > these we'd need:
> > 
> > diff --git a/drivers/iio/light/opt4001.c b/drivers/iio/light/opt4001.c
> > index feb57cb99aa4..502946bf9f94 100644
> > --- a/drivers/iio/light/opt4001.c
> > +++ b/drivers/iio/light/opt4001.c
> > @@ -457,7 +457,7 @@ static struct i2c_driver opt4001_driver = {
> >  		.name = "opt4001",
> >  		.of_match_table = opt4001_of_match,
> >  	},
> > -	.probe_new = opt4001_probe,
> > +	.probe = opt4001_probe,
> >  	.id_table = opt4001_id,
> >  };
> >  module_i2c_driver(opt4001_driver);
> > diff --git a/drivers/iio/light/rohm-bu27008.c b/drivers/iio/light/rohm-bu27008.c
> > index adac4cd8d905..489902bed7f0 100644
> > --- a/drivers/iio/light/rohm-bu27008.c
> > +++ b/drivers/iio/light/rohm-bu27008.c
> > @@ -1016,7 +1016,7 @@ static struct i2c_driver bu27008_i2c_driver = {
> >  		.of_match_table = bu27008_of_match,
> >  		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
> >  	},
> > -	.probe_new = bu27008_probe,
> > +	.probe = bu27008_probe,
> >  };
> >  module_i2c_driver(bu27008_i2c_driver);
> >  
> > diff --git a/drivers/iio/pressure/mprls0025pa.c b/drivers/iio/pressure/mprls0025pa.c
> > index 06f40e47c68e..30fb2de36821 100644
> > --- a/drivers/iio/pressure/mprls0025pa.c
> > +++ b/drivers/iio/pressure/mprls0025pa.c
> > @@ -436,7 +436,7 @@ static const struct i2c_device_id mpr_id[] = {
> >  MODULE_DEVICE_TABLE(i2c, mpr_id);
> >  
> >  static struct i2c_driver mpr_driver = {
> > -	.probe_new	= mpr_probe,
> > +	.probe		= mpr_probe,
> >  	.id_table	= mpr_id,
> >  	.driver		= {
> >  		.name		= "mprls0025pa",
> > 
> > At some point I'd need to address these. What is your preferred way to
> > handle these? I can send a proper follow up patch, you can squash the
> > above diff into be8e2ed93211 ... just tell me your preference. If you
> > don't I will send a patch at some point.
> 
> Good point. I wasn't paying attention.  Some of these at least are after
> your patch in my tree, so I've fixed those up at introduction rather than
> messing around with a follow on patch.
> 
> I squashed the opt4001 into this patch as that driver is now upstream.
> 
> So should all look good now.  I'll probably miss some more later in the
> series though so if you notice, do point them out! Takes a while for
> my review brain to pick up on function name changes ;)
> 
> New version of testing pushed out just now.

Just for the record:
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing (as
of commit f3ae82534ab2 "iio: imu: inv_icm42600: avoid frequent timestamp
jitter") looks good. All drivers are properly converted to .probe()
there.

Best regards

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux