Re: [PATCH] w1: ds2482: Switch back to use struct i2c_driver's .probe()

From: Uwe Kleine-König
Date: Tue Jun 13 2023 - 03:02:47 EST


Hello Krzysztof,

On Mon, Jun 12, 2023 at 10:10:30PM +0200, Krzysztof Kozlowski wrote:
> On 12/06/2023 09:28, Uwe Kleine-König wrote:
> > After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
> > call-back type"), all drivers being converted to .probe_new() and then
> > commit 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>
> > ---
> > drivers/w1/masters/ds2482.c | 2 +-
>
> Thank you for the patch.
> It is too late in the cycle for me to pick it up. I will take it after
> the merge window.

This is one of only 19 patches that are still needed on top of what is
currently in next before I can drop .probe_new() which I intended to
tackle after the upcoming merge window. I expect that most of these 19
patches will still be picked up and go into v6.5-rc1.

Assuming there are only less than 10 patches remaining on top of
v6.5-rc1, I intend to create a pull request for Wolfram with the
remaining bits and a patch doing

diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 13a1ce38cb0c..3b2434812611 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);


early after v6.5-rc1.

So an ack from your side would be very welcome.

Best regards
Uwe

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

Attachment: signature.asc
Description: PGP signature