diff mbox series

[117/606] iio: light: apds9960: Convert to i2c's .probe_new()

Message ID 20221118224540.619276-118-uwe@kleine-koenig.org (mailing list archive)
State Accepted
Headers show
Series i2c: Complete conversion to i2c_probe_new | expand

Commit Message

Uwe Kleine-König Nov. 18, 2022, 10:37 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/iio/light/apds9960.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Matt Ranostay Nov. 19, 2022, 5:47 a.m. UTC | #1
On Sat, Nov 19, 2022 at 6:46 AM Uwe Kleine-König <uwe@kleine-koenig.org> 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>

Looks good to me.

Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>

> ---
>  drivers/iio/light/apds9960.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
> index a585ce0c122f..cc5974a95bd3 100644
> --- a/drivers/iio/light/apds9960.c
> +++ b/drivers/iio/light/apds9960.c
> @@ -988,8 +988,7 @@ static int apds9960_chip_init(struct apds9960_data *data)
>         return apds9960_set_powermode(data, 1);
>  }
>
> -static int apds9960_probe(struct i2c_client *client,
> -                         const struct i2c_device_id *id)
> +static int apds9960_probe(struct i2c_client *client)
>  {
>         struct apds9960_data *data;
>         struct iio_dev *indio_dev;
> @@ -1132,7 +1131,7 @@ static struct i2c_driver apds9960_driver = {
>                 .pm     = &apds9960_pm_ops,
>                 .acpi_match_table = apds9960_acpi_match,
>         },
> -       .probe          = apds9960_probe,
> +       .probe_new      = apds9960_probe,
>         .remove         = apds9960_remove,
>         .id_table       = apds9960_id,
>  };
> --
> 2.38.1
>
diff mbox series

Patch

diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
index a585ce0c122f..cc5974a95bd3 100644
--- a/drivers/iio/light/apds9960.c
+++ b/drivers/iio/light/apds9960.c
@@ -988,8 +988,7 @@  static int apds9960_chip_init(struct apds9960_data *data)
 	return apds9960_set_powermode(data, 1);
 }
 
-static int apds9960_probe(struct i2c_client *client,
-			  const struct i2c_device_id *id)
+static int apds9960_probe(struct i2c_client *client)
 {
 	struct apds9960_data *data;
 	struct iio_dev *indio_dev;
@@ -1132,7 +1131,7 @@  static struct i2c_driver apds9960_driver = {
 		.pm	= &apds9960_pm_ops,
 		.acpi_match_table = apds9960_acpi_match,
 	},
-	.probe		= apds9960_probe,
+	.probe_new	= apds9960_probe,
 	.remove		= apds9960_remove,
 	.id_table	= apds9960_id,
 };