2023-02-24 12:06:40

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH 5/9] media: i2c: ov5695: convert to i2c's .probe_new()

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

Reviewed-by: Kieran Bingham <[email protected]>
Link: https://lore.kernel.org/lkml/[email protected]
Signed-off-by: Uwe Kleine-König <[email protected]>
---
drivers/media/i2c/ov5695.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/i2c/ov5695.c b/drivers/media/i2c/ov5695.c
index 61906fc54e37..b287c28920a6 100644
--- a/drivers/media/i2c/ov5695.c
+++ b/drivers/media/i2c/ov5695.c
@@ -1267,8 +1267,7 @@ static int ov5695_configure_regulators(struct ov5695 *ov5695)
ov5695->supplies);
}

-static int ov5695_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int ov5695_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
struct ov5695 *ov5695;
@@ -1393,7 +1392,7 @@ static struct i2c_driver ov5695_i2c_driver = {
.pm = &ov5695_pm_ops,
.of_match_table = of_match_ptr(ov5695_of_match),
},
- .probe = &ov5695_probe,
+ .probe_new = &ov5695_probe,
.remove = &ov5695_remove,
};

--
2.39.1



2023-02-24 12:41:45

by Hans Verkuil

[permalink] [raw]
Subject: Re: [PATCH 5/9] media: i2c: ov5695: convert to i2c's .probe_new()

On 24/02/2023 13:05, Uwe Kleine-König wrote:
> The probe function doesn't make use of the i2c_device_id * parameter so
> it can be trivially converted.
>
> Reviewed-by: Kieran Bingham <[email protected]>

Acked-by: Hans Verkuil <[email protected]>

> Link: https://lore.kernel.org/lkml/[email protected]
> Signed-off-by: Uwe Kleine-König <[email protected]>
> ---
> drivers/media/i2c/ov5695.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/i2c/ov5695.c b/drivers/media/i2c/ov5695.c
> index 61906fc54e37..b287c28920a6 100644
> --- a/drivers/media/i2c/ov5695.c
> +++ b/drivers/media/i2c/ov5695.c
> @@ -1267,8 +1267,7 @@ static int ov5695_configure_regulators(struct ov5695 *ov5695)
> ov5695->supplies);
> }
>
> -static int ov5695_probe(struct i2c_client *client,
> - const struct i2c_device_id *id)
> +static int ov5695_probe(struct i2c_client *client)
> {
> struct device *dev = &client->dev;
> struct ov5695 *ov5695;
> @@ -1393,7 +1392,7 @@ static struct i2c_driver ov5695_i2c_driver = {
> .pm = &ov5695_pm_ops,
> .of_match_table = of_match_ptr(ov5695_of_match),
> },
> - .probe = &ov5695_probe,
> + .probe_new = &ov5695_probe,
> .remove = &ov5695_remove,
> };
>