[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1c8cee3a-41e1-d02a-d7cf-549d91ac0143@redhat.com>
Date: Sat, 19 Nov 2022 13:58:01 +0100
From: Hans de Goede <hdegoede@...hat.com>
To: Uwe Kleine-König <uwe@...ine-koenig.org>,
Angel Iglesias <ang.iglesiasg@...il.com>,
Lee Jones <lee.jones@...aro.org>,
Grant Likely <grant.likely@...aro.org>,
Wolfram Sang <wsa@...nel.org>,
Sebastian Reichel <sre@...nel.org>
Cc: linux-i2c@...r.kernel.org, kernel@...gutronix.de,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Sebastian Krzyszkowiak <sebastian.krzyszkowiak@...i.sm>,
Purism Kernel Team <kernel@...i.sm>,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 529/606] power: supply: max17042_battery: Convert to i2c's
.probe_new()
Hi,
On 11/18/22 23:44, Uwe Kleine-König wrote:
> From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
>
> .probe_new() doesn't get the i2c_device_id * parameter, so determine
> that explicitly in the probe function.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <hdegoede@...hat.com>
Regards,
Hans
> ---
> drivers/power/supply/max17042_battery.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c
> index ab031bbfbe78..89cabe8ed3b0 100644
> --- a/drivers/power/supply/max17042_battery.c
> +++ b/drivers/power/supply/max17042_battery.c
> @@ -1031,9 +1031,9 @@ static const struct power_supply_desc max17042_no_current_sense_psy_desc = {
> .num_properties = ARRAY_SIZE(max17042_battery_props) - 2,
> };
>
> -static int max17042_probe(struct i2c_client *client,
> - const struct i2c_device_id *id)
> +static int max17042_probe(struct i2c_client *client)
> {
> + const struct i2c_device_id *id = i2c_client_get_device_id(client);
> struct i2c_adapter *adapter = client->adapter;
> const struct power_supply_desc *max17042_desc = &max17042_psy_desc;
> struct power_supply_config psy_cfg = {};
> @@ -1220,7 +1220,7 @@ static struct i2c_driver max17042_i2c_driver = {
> .of_match_table = of_match_ptr(max17042_dt_match),
> .pm = &max17042_pm_ops,
> },
> - .probe = max17042_probe,
> + .probe_new = max17042_probe,
> .id_table = max17042_id,
> };
> module_i2c_driver(max17042_i2c_driver);
Powered by blists - more mailing lists