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

power: supply: Drop explicit initialization of struct i2c_device_id::driver_data to 0



These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

While add it, also remove commas after the sentinel entries.

Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20240522164830.61646-2-u.kleine-koenig@pengutronix.de


Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 1613e604
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -727,7 +727,7 @@ static int adp5061_probe(struct i2c_client *client)
}

static const struct i2c_device_id adp5061_id[] = {
	{ "adp5061", 0},
	{ "adp5061" },
	{ }
};
MODULE_DEVICE_TABLE(i2c, adp5061_id);
+1 −1
Original line number Diff line number Diff line
@@ -489,7 +489,7 @@ static int bq24735_charger_probe(struct i2c_client *client)
}

static const struct i2c_device_id bq24735_charger_id[] = {
	{ "bq24735-charger", 0 },
	{ "bq24735-charger" },
	{}
};
MODULE_DEVICE_TABLE(i2c, bq24735_charger_id);
+5 −5
Original line number Diff line number Diff line
@@ -1617,11 +1617,11 @@ static const struct dev_pm_ops bq25890_pm = {
};

static const struct i2c_device_id bq25890_i2c_ids[] = {
	{ "bq25890", 0 },
	{ "bq25892", 0 },
	{ "bq25895", 0 },
	{ "bq25896", 0 },
	{},
	{ "bq25890" },
	{ "bq25892" },
	{ "bq25895" },
	{ "bq25896" },
	{}
};
MODULE_DEVICE_TABLE(i2c, bq25890_i2c_ids);

+1 −1
Original line number Diff line number Diff line
@@ -731,7 +731,7 @@ static int __maybe_unused cw_bat_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(cw_bat_pm_ops, cw_bat_suspend, cw_bat_resume);

static const struct i2c_device_id cw_bat_id_table[] = {
	{ "cw2015", 0 },
	{ "cw2015" },
	{ }
};

+1 −1
Original line number Diff line number Diff line
@@ -584,7 +584,7 @@ static const struct of_device_id lp8727_dt_ids[] __maybe_unused = {
MODULE_DEVICE_TABLE(of, lp8727_dt_ids);

static const struct i2c_device_id lp8727_ids[] = {
	{"lp8727", 0},
	{ "lp8727" },
	{ }
};
MODULE_DEVICE_TABLE(i2c, lp8727_ids);
Loading