Commit a07fca69 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Sebastian Reichel
Browse files

power: supply: max17040: 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>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent b17018de
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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);