Commit d9ac265b authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Sebastian Reichel

power: supply: max17042_battery: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent a07fca69
...@@ -1031,9 +1031,9 @@ static const struct power_supply_desc max17042_no_current_sense_psy_desc = { ...@@ -1031,9 +1031,9 @@ static const struct power_supply_desc max17042_no_current_sense_psy_desc = {
.num_properties = ARRAY_SIZE(max17042_battery_props) - 2, .num_properties = ARRAY_SIZE(max17042_battery_props) - 2,
}; };
static int max17042_probe(struct i2c_client *client, static int max17042_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
const struct i2c_device_id *id = i2c_client_get_device_id(client);
struct i2c_adapter *adapter = client->adapter; struct i2c_adapter *adapter = client->adapter;
const struct power_supply_desc *max17042_desc = &max17042_psy_desc; const struct power_supply_desc *max17042_desc = &max17042_psy_desc;
struct power_supply_config psy_cfg = {}; struct power_supply_config psy_cfg = {};
...@@ -1220,7 +1220,7 @@ static struct i2c_driver max17042_i2c_driver = { ...@@ -1220,7 +1220,7 @@ static struct i2c_driver max17042_i2c_driver = {
.of_match_table = of_match_ptr(max17042_dt_match), .of_match_table = of_match_ptr(max17042_dt_match),
.pm = &max17042_pm_ops, .pm = &max17042_pm_ops,
}, },
.probe = max17042_probe, .probe_new = max17042_probe,
.id_table = max17042_id, .id_table = max17042_id,
}; };
module_i2c_driver(max17042_i2c_driver); module_i2c_driver(max17042_i2c_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment