[596/606] watchdog: ziirave_wdt: Convert to i2c's .probe_new()

Message ID 20221118224540.619276-597-uwe@kleine-koenig.org
State New
Headers
Series i2c: Complete conversion to i2c_probe_new |

Commit Message

Uwe Kleine-König Nov. 18, 2022, 10:45 p.m. UTC
  From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/watchdog/ziirave_wdt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
  

Comments

Uwe Kleine-König Jan. 27, 2023, 10:32 a.m. UTC | #1
Hello,

On Fri, Nov 18, 2022 at 02:57:47PM -0800, Guenter Roeck wrote:
> On Fri, Nov 18, 2022 at 11:45:30PM +0100, Uwe Kleine-König wrote:
> > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > 
> > The probe function doesn't make use of the i2c_device_id * parameter so it
> > can be trivially converted.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>

This patch hasn't made it into next yet. Is it still on your radar?

My plans for this series is to complete the conversion after the next
merge window which should include most patches from this series.

So I ask you to either take this patch during the next merge window or
accept that it will be applied together with the i2c core conversion
that drops .probe() with the i2c_device_id parameter.

Best regards
Uwe
  
Guenter Roeck Jan. 31, 2023, 5:01 p.m. UTC | #2
On Fri, Nov 18, 2022 at 11:45:30PM +0100, Uwe Kleine-König wrote:
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> The probe function doesn't make use of the i2c_device_id * parameter so it
> can be trivially converted.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/ziirave_wdt.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/watchdog/ziirave_wdt.c b/drivers/watchdog/ziirave_wdt.c
> index d0e88875443a..21ca08a694ee 100644
> --- a/drivers/watchdog/ziirave_wdt.c
> +++ b/drivers/watchdog/ziirave_wdt.c
> @@ -593,8 +593,7 @@ static int ziirave_wdt_init_duration(struct i2c_client *client)
>  					 reset_duration);
>  }
>  
> -static int ziirave_wdt_probe(struct i2c_client *client,
> -			     const struct i2c_device_id *id)
> +static int ziirave_wdt_probe(struct i2c_client *client)
>  {
>  	int ret;
>  	struct ziirave_wdt_data *w_priv;
> @@ -732,7 +731,7 @@ static struct i2c_driver ziirave_wdt_driver = {
>  		.name = "ziirave_wdt",
>  		.of_match_table = zrv_wdt_of_match,
>  	},
> -	.probe = ziirave_wdt_probe,
> +	.probe_new = ziirave_wdt_probe,
>  	.remove = ziirave_wdt_remove,
>  	.id_table = ziirave_wdt_id,
>  };
  
Uwe Kleine-König Feb. 11, 2023, 11:01 p.m. UTC | #3
Hello,

On Fri, Jan 27, 2023 at 11:32:04AM +0100, Uwe Kleine-König wrote:
> On Fri, Nov 18, 2022 at 02:57:47PM -0800, Guenter Roeck wrote:
> > On Fri, Nov 18, 2022 at 11:45:30PM +0100, Uwe Kleine-König wrote:
> > > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > 
> > > The probe function doesn't make use of the i2c_device_id * parameter so it
> > > can be trivially converted.
> > > 
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > 
> > Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> 
> This patch hasn't made it into next yet. Is it still on your radar?
> 
> My plans for this series is to complete the conversion after the next
> merge window which should include most patches from this series.
> 
> So I ask you to either take this patch during the next merge window or
> accept that it will be applied together with the i2c core conversion
> that drops .probe() with the i2c_device_id parameter.

This got Guenter's R-b tag twice now, but the patch didn't appear yet in
next. I'll prepare a series for Wolfram to apply via his i2c tree based
on what is in next during the merge window with the idea to get the
change early into next with an immutable tag. If you get this patch in
during the merge window that would be ideal, but if not, I will take
care of it and as announced will send it together with the i2c change.

Best regards
Uwe
  
Guenter Roeck Feb. 12, 2023, 12:11 a.m. UTC | #4
On 2/11/23 15:01, Uwe Kleine-König wrote:
> Hello,
> 
> On Fri, Jan 27, 2023 at 11:32:04AM +0100, Uwe Kleine-König wrote:
>> On Fri, Nov 18, 2022 at 02:57:47PM -0800, Guenter Roeck wrote:
>>> On Fri, Nov 18, 2022 at 11:45:30PM +0100, Uwe Kleine-König wrote:
>>>> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>>>>
>>>> The probe function doesn't make use of the i2c_device_id * parameter so it
>>>> can be trivially converted.
>>>>
>>>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>>>
>>> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
>>
>> This patch hasn't made it into next yet. Is it still on your radar?
>>
>> My plans for this series is to complete the conversion after the next
>> merge window which should include most patches from this series.
>>
>> So I ask you to either take this patch during the next merge window or
>> accept that it will be applied together with the i2c core conversion
>> that drops .probe() with the i2c_device_id parameter.
> 
> This got Guenter's R-b tag twice now, but the patch didn't appear yet in
> next. I'll prepare a series for Wolfram to apply via his i2c tree based
> on what is in next during the merge window with the idea to get the
> change early into next with an immutable tag. If you get this patch in
> during the merge window that would be ideal, but if not, I will take
> care of it and as announced will send it together with the i2c change.
> 

It is in my watchdog-next tree, and we can only hope that Wim
will pick it up from there.

Guenter
  

Patch

diff --git a/drivers/watchdog/ziirave_wdt.c b/drivers/watchdog/ziirave_wdt.c
index d0e88875443a..21ca08a694ee 100644
--- a/drivers/watchdog/ziirave_wdt.c
+++ b/drivers/watchdog/ziirave_wdt.c
@@ -593,8 +593,7 @@  static int ziirave_wdt_init_duration(struct i2c_client *client)
 					 reset_duration);
 }
 
-static int ziirave_wdt_probe(struct i2c_client *client,
-			     const struct i2c_device_id *id)
+static int ziirave_wdt_probe(struct i2c_client *client)
 {
 	int ret;
 	struct ziirave_wdt_data *w_priv;
@@ -732,7 +731,7 @@  static struct i2c_driver ziirave_wdt_driver = {
 		.name = "ziirave_wdt",
 		.of_match_table = zrv_wdt_of_match,
 	},
-	.probe = ziirave_wdt_probe,
+	.probe_new = ziirave_wdt_probe,
 	.remove = ziirave_wdt_remove,
 	.id_table = ziirave_wdt_id,
 };