2022-11-19 00:40:56

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH 513/606] power: supply: adp5061: Convert to i2c's .probe_new()

From: Uwe Kleine-König <[email protected]>

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 <[email protected]>
---
drivers/power/supply/adp5061.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/power/supply/adp5061.c b/drivers/power/supply/adp5061.c
index fcf8ff0bc974..840db629a46c 100644
--- a/drivers/power/supply/adp5061.c
+++ b/drivers/power/supply/adp5061.c
@@ -694,8 +694,7 @@ static const struct power_supply_desc adp5061_desc = {
.num_properties = ARRAY_SIZE(adp5061_props),
};

-static int adp5061_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int adp5061_probe(struct i2c_client *client)
{
struct power_supply_config psy_cfg = {};
struct adp5061_state *st;
@@ -737,7 +736,7 @@ static struct i2c_driver adp5061_driver = {
.driver = {
.name = KBUILD_MODNAME,
},
- .probe = adp5061_probe,
+ .probe_new = adp5061_probe,
.id_table = adp5061_id,
};
module_i2c_driver(adp5061_driver);
--
2.38.1



2022-11-21 10:09:11

by Hennerich, Michael

[permalink] [raw]
Subject: RE: [PATCH 513/606] power: supply: adp5061: Convert to i2c's .probe_new()



> -----Original Message-----
> From: Uwe Kleine-König <[email protected]>
> Sent: Freitag, 18. November 2022 23:44
> To: Angel Iglesias <[email protected]>; Lee Jones
> <[email protected]>; Grant Likely <[email protected]>; Wolfram
> Sang <[email protected]>; Hennerich, Michael
> <[email protected]>; Sebastian Reichel <[email protected]>
> Cc: [email protected]; [email protected]; Uwe Kleine-König
> <[email protected]>; [email protected]; linux-
> [email protected]
> Subject: [PATCH 513/606] power: supply: adp5061: Convert to i2c's
> .probe_new()
>
>
> From: Uwe Kleine-König <[email protected]>
>
> 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 <[email protected]>

Acked-by: Michael Hennerich <[email protected]>

> ---
> drivers/power/supply/adp5061.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/power/supply/adp5061.c
> b/drivers/power/supply/adp5061.c index fcf8ff0bc974..840db629a46c
> 100644
> --- a/drivers/power/supply/adp5061.c
> +++ b/drivers/power/supply/adp5061.c
> @@ -694,8 +694,7 @@ static const struct power_supply_desc adp5061_desc
> = {
> .num_properties = ARRAY_SIZE(adp5061_props),
> };
>
> -static int adp5061_probe(struct i2c_client *client,
> - const struct i2c_device_id *id)
> +static int adp5061_probe(struct i2c_client *client)
> {
> struct power_supply_config psy_cfg = {};
> struct adp5061_state *st;
> @@ -737,7 +736,7 @@ static struct i2c_driver adp5061_driver = {
> .driver = {
> .name = KBUILD_MODNAME,
> },
> - .probe = adp5061_probe,
> + .probe_new = adp5061_probe,
> .id_table = adp5061_id,
> };
> module_i2c_driver(adp5061_driver);
> --
> 2.38.1