[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221118224540.619276-529-uwe@kleine-koenig.org>
Date: Fri, 18 Nov 2022 23:44:22 +0100
From: Uwe Kleine-König <uwe@...ine-koenig.org>
To: 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>,
Iskren Chernev <iskren.chernev@...il.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Matheus Castello <matheus@...tello.eng.br>,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 528/606] power: supply: max17040: Convert to i2c's .probe_new()
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>
---
drivers/power/supply/max17040_battery.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/power/supply/max17040_battery.c b/drivers/power/supply/max17040_battery.c
index a9aef1e8b186..d1075959dd46 100644
--- a/drivers/power/supply/max17040_battery.c
+++ b/drivers/power/supply/max17040_battery.c
@@ -430,9 +430,9 @@ static const struct power_supply_desc max17040_battery_desc = {
.num_properties = ARRAY_SIZE(max17040_battery_props),
};
-static int max17040_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int max17040_probe(struct i2c_client *client)
{
+ const struct i2c_device_id *id = i2c_client_get_device_id(client);
struct i2c_adapter *adapter = client->adapter;
struct power_supply_config psy_cfg = {};
struct max17040_chip *chip;
@@ -599,7 +599,7 @@ static struct i2c_driver max17040_i2c_driver = {
.of_match_table = max17040_of_match,
.pm = MAX17040_PM_OPS,
},
- .probe = max17040_probe,
+ .probe_new = max17040_probe,
.id_table = max17040_id,
};
module_i2c_driver(max17040_i2c_driver);
--
2.38.1
Powered by blists - more mailing lists