Re: [PATCH] backlight: ktz8866: Convert to i2c's .probe_new()

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

 



On Fri, Jan 27, 2023 at 04:26:39PM +0100, Uwe Kleine-König wrote:
> 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@xxxxxxxxxxxxxx>
> ---
> Hello,
> 
> there is an ongoing effort to convert all drivers to .probe_new to
> eventually drop .probe with the i2c_device_id parameter. This driver
> currently sits in next so wasn't on my radar before.
> 
> My plan is to tackle that after the next merge window. So I ask you to
> either apply this patch during the next merge window or accept that it
> will go in via the i2c tree together with the patch that drops .probe().
> 
> Best regards
> Uwe
> 
>  drivers/video/backlight/ktz8866.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/backlight/ktz8866.c b/drivers/video/backlight/ktz8866.c
> index 97b723719e13..d38c13ad39c7 100644
> --- a/drivers/video/backlight/ktz8866.c
> +++ b/drivers/video/backlight/ktz8866.c
> @@ -124,8 +124,7 @@ static void ktz8866_init(struct ktz8866 *ktz)
>  		ktz8866_write(ktz, LCD_BIAS_CFG1, LCD_BIAS_EN);
>  }
>  
> -static int ktz8866_probe(struct i2c_client *client,
> -			 const struct i2c_device_id *id)
> +static int ktz8866_probe(struct i2c_client *client)
>  {
>  	struct backlight_device *backlight_dev;
>  	struct backlight_properties props;
> @@ -197,7 +196,7 @@ static struct i2c_driver ktz8866_driver = {
>  		.name = "ktz8866",
>  		.of_match_table = ktz8866_match_table,
>  	},
> -	.probe = ktz8866_probe,
> +	.probe_new = ktz8866_probe,
I think .probe_new() will be renamed to new .probe() again when there are
patches dropping old .probe(). I prefer that you pack this commit to the
i2c-tree commit that drops old .probe(). 
>  	.remove = ktz8866_remove,
>  	.id_table = ktz8866_ids,
>  };
> 
> base-commit: 2241ab53cbb5cdb08a6b2d4688feb13971058f65
> prerequisite-patch-id: 2e7d7db8c0a90b8cd1deb6bbc51ead4c89c89b62
> -- 
> 2.39.0
> 



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux