diff mbox series

[512/606] platform/chrome: cros_ec: Convert to i2c's .probe_new()

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

Commit Message

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

Comments

Guenter Roeck Nov. 18, 2022, 10:55 p.m. UTC | #1
On Fri, Nov 18, 2022 at 2:48 PM 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>


Reviewed-by: Guenter Roeck <groeck@chromium.org>

> ---
>  drivers/platform/chrome/cros_ec_i2c.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/chrome/cros_ec_i2c.c b/drivers/platform/chrome/cros_ec_i2c.c
> index b6823c654c3f..dbe698f33128 100644
> --- a/drivers/platform/chrome/cros_ec_i2c.c
> +++ b/drivers/platform/chrome/cros_ec_i2c.c
> @@ -286,8 +286,7 @@ static int cros_ec_cmd_xfer_i2c(struct cros_ec_device *ec_dev,
>         return ret;
>  }
>
> -static int cros_ec_i2c_probe(struct i2c_client *client,
> -                            const struct i2c_device_id *dev_id)
> +static int cros_ec_i2c_probe(struct i2c_client *client)
>  {
>         struct device *dev = &client->dev;
>         struct cros_ec_device *ec_dev = NULL;
> @@ -373,7 +372,7 @@ static struct i2c_driver cros_ec_driver = {
>                 .of_match_table = of_match_ptr(cros_ec_i2c_of_match),
>                 .pm     = &cros_ec_i2c_pm_ops,
>         },
> -       .probe          = cros_ec_i2c_probe,
> +       .probe_new      = cros_ec_i2c_probe,
>         .remove         = cros_ec_i2c_remove,
>         .id_table       = cros_ec_i2c_id,
>  };
> --
> 2.38.1
>
diff mbox series

Patch

diff --git a/drivers/platform/chrome/cros_ec_i2c.c b/drivers/platform/chrome/cros_ec_i2c.c
index b6823c654c3f..dbe698f33128 100644
--- a/drivers/platform/chrome/cros_ec_i2c.c
+++ b/drivers/platform/chrome/cros_ec_i2c.c
@@ -286,8 +286,7 @@  static int cros_ec_cmd_xfer_i2c(struct cros_ec_device *ec_dev,
 	return ret;
 }
 
-static int cros_ec_i2c_probe(struct i2c_client *client,
-			     const struct i2c_device_id *dev_id)
+static int cros_ec_i2c_probe(struct i2c_client *client)
 {
 	struct device *dev = &client->dev;
 	struct cros_ec_device *ec_dev = NULL;
@@ -373,7 +372,7 @@  static struct i2c_driver cros_ec_driver = {
 		.of_match_table = of_match_ptr(cros_ec_i2c_of_match),
 		.pm	= &cros_ec_i2c_pm_ops,
 	},
-	.probe		= cros_ec_i2c_probe,
+	.probe_new	= cros_ec_i2c_probe,
 	.remove		= cros_ec_i2c_remove,
 	.id_table	= cros_ec_i2c_id,
 };