Message ID | 20230905194253.256054-3-u.kleine-koenig@pengutronix.de |
---|---|
State | Accepted |
Headers | show |
Series | i2c: Finalize the .probe_new() quest | expand |
On Tue, Sep 05, 2023 at 09:42:53PM +0200, Uwe Kleine-König wrote: > Now that all drivers are converted to the (new) .probe() callback, the > temporary .probe_new() can go away. \o/ > > Link: https://lore.kernel.org/linux-i2c/20230626094548.559542-1-u.kleine-koenig@pengutronix.de > Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> > Reviewed-by: Jean Delvare <jdelvare@suse.de> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Aaaaaand applied to for-current, thanks! Hooray \o/ Thank you, Uwe!
On Tue, 05 Sep 2023, Uwe Kleine-König wrote: > Now that all drivers are converted to the (new) .probe() callback, the > temporary .probe_new() can go away. \o/ > > Link: https://lore.kernel.org/linux-i2c/20230626094548.559542-1-u.kleine-koenig@pengutronix.de > Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> > Reviewed-by: Jean Delvare <jdelvare@suse.de> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > --- > include/linux/i2c.h | 11 +---------- > 1 file changed, 1 insertion(+), 10 deletions(-) > > diff --git a/include/linux/i2c.h b/include/linux/i2c.h > index 3430cc2b05a6..0dae9db27538 100644 > --- a/include/linux/i2c.h > +++ b/include/linux/i2c.h > @@ -237,7 +237,6 @@ enum i2c_driver_flags { > * struct i2c_driver - represent an I2C device driver > * @class: What kind of i2c device we instantiate (for detect) > * @probe: Callback for device binding > - * @probe_new: Transitional callback for device binding - do not use > * @remove: Callback for device unbinding > * @shutdown: Callback for device shutdown > * @alert: Alert callback, for example for the SMBus alert protocol > @@ -272,16 +271,8 @@ enum i2c_driver_flags { > struct i2c_driver { > unsigned int class; > > - union { > /* Standard driver model interfaces */ > - int (*probe)(struct i2c_client *client); > - /* > - * Legacy callback that was part of a conversion of .probe(). > - * Today it has the same semantic as .probe(). Don't use for new > - * code. > - */ > - int (*probe_new)(struct i2c_client *client); > - }; > + int (*probe)(struct i2c_client *client); > void (*remove)(struct i2c_client *client); *party smiley* Good going Uwe!
Hello Wolfram, On Wed, Sep 13, 2023 at 10:50:41AM +0200, Wolfram Sang wrote: > On Tue, Sep 05, 2023 at 09:42:53PM +0200, Uwe Kleine-König wrote: > > Now that all drivers are converted to the (new) .probe() callback, the > > temporary .probe_new() can go away. \o/ > > > > Link: https://lore.kernel.org/linux-i2c/20230626094548.559542-1-u.kleine-koenig@pengutronix.de > > Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> > > Reviewed-by: Jean Delvare <jdelvare@suse.de> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > > Aaaaaand applied to for-current, thanks! Hooray \o/ Thank you, Uwe! you even took it via a faster path than I expected (i.e. it went in for 6.6-rc2 instead of 6.7-rc1). Thanks! Uwe
> you even took it via a faster path than I expected (i.e. it went in for > 6.6-rc2 instead of 6.7-rc1). Was that bad? Was there a reason to wait?
Hello Wolfram, On Wed, Sep 20, 2023 at 11:04:07AM +0200, Wolfram Sang wrote: > > > you even took it via a faster path than I expected (i.e. it went in for > > 6.6-rc2 instead of 6.7-rc1). > > Was that bad? Was there a reason to wait? No, it's great. This way I can reduce my checks about new drivers being added that get it wrong. I just expected that this change doesn't qualify to be applied after -rc1 and I'd have to wait for the next merge window. Best regards Uwe
> added that get it wrong. I just expected that this change doesn't > qualify to be applied after -rc1 and I'd have to wait for the next merge > window. When something is cleaned up with rc1, then removing deprecated interfaces for rc2 always worked for me. As you said, it prevents people from using the old interface again.
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 3430cc2b05a6..0dae9db27538 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -237,7 +237,6 @@ enum i2c_driver_flags { * struct i2c_driver - represent an I2C device driver * @class: What kind of i2c device we instantiate (for detect) * @probe: Callback for device binding - * @probe_new: Transitional callback for device binding - do not use * @remove: Callback for device unbinding * @shutdown: Callback for device shutdown * @alert: Alert callback, for example for the SMBus alert protocol @@ -272,16 +271,8 @@ enum i2c_driver_flags { struct i2c_driver { unsigned int class; - union { /* Standard driver model interfaces */ - int (*probe)(struct i2c_client *client); - /* - * Legacy callback that was part of a conversion of .probe(). - * Today it has the same semantic as .probe(). Don't use for new - * code. - */ - int (*probe_new)(struct i2c_client *client); - }; + int (*probe)(struct i2c_client *client); void (*remove)(struct i2c_client *client);