Re: [PATCH 7/9] i2c: Switch .probe() to not take an id parameter

Uwe Kleine-König
2023-02-24T18:04:12Z

[-- Attachment #1: Type: text/plain, Size: 1776 bytes --]

Hello Luca,

On Fri, Feb 24, 2023 at 05:02:18PM +0100, Luca Ceresoli wrote:
> On Fri, 24 Feb 2023 13:05:58 +0100
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > [...]
> > diff --git a/include/linux/i2c.h b/include/linux/i2c.h
> > index d84e0e99f084..c3e022d53182 100644
> > --- a/include/linux/i2c.h
> > +++ b/include/linux/i2c.h
> > @@ -272,14 +272,18 @@ enum i2c_driver_flags {
> > struct i2c_driver {
> > unsigned int class;
> >
> > + union {
> > /* Standard driver model interfaces */
> > - int (*probe)(struct i2c_client *client, const struct i2c_device_id *id);
> > + 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);
> > + };
> > void (*remove)(struct i2c_client *client);
> >
> > - /* New driver model interface to aid the seamless removal of the
> > - * current probe()'s, more commonly unused than used second parameter.
> > - */
> > - int (*probe_new)(struct i2c_client *client);
>
> The kerneldoc for this struct should also be updated:
>
> - * @probe: Callback for device binding - soon to be deprecated
> - * @probe_new: New callback for device binding
> + * @probe: Callback for device binding
> + * @probe_new: Transitional callback for device binding - do not use

Indeed. I will send an updated patch series near the end of the merge
window, with your suggested change squashed in.

Thanks
Uwe

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]