Commit 4391affa authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Jonathan Cameron
Browse files

iio: 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/20240508072928.2135858-2-u.kleine-koenig@pengutronix.de


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 1b5a2466
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -61,8 +61,8 @@ static int adxl367_i2c_probe(struct i2c_client *client)
}

static const struct i2c_device_id adxl367_i2c_id[] = {
	{ "adxl367", 0 },
	{ },
	{ "adxl367" },
	{ }
};
MODULE_DEVICE_TABLE(i2c, adxl367_i2c_id);

+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ static int adxl372_i2c_probe(struct i2c_client *client)
}

static const struct i2c_device_id adxl372_i2c_id[] = {
	{ "adxl372", 0 },
	{ "adxl372" },
	{}
};
MODULE_DEVICE_TABLE(i2c, adxl372_i2c_id);
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ static int bma400_i2c_probe(struct i2c_client *client)
}

static const struct i2c_device_id bma400_i2c_ids[] = {
	{ "bma400", 0 },
	{ "bma400" },
	{ }
};
MODULE_DEVICE_TABLE(i2c, bma400_i2c_ids);
+1 −1
Original line number Diff line number Diff line
@@ -268,7 +268,7 @@ static int da311_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(da311_pm_ops, da311_suspend, da311_resume);

static const struct i2c_device_id da311_i2c_id[] = {
	{"da311", 0},
	{ "da311" },
	{}
};
MODULE_DEVICE_TABLE(i2c, da311_i2c_id);
+3 −3
Original line number Diff line number Diff line
@@ -201,9 +201,9 @@ static DEFINE_SIMPLE_DEV_PM_OPS(dmard06_pm_ops, dmard06_suspend,
				dmard06_resume);

static const struct i2c_device_id dmard06_id[] = {
	{ "dmard05", 0 },
	{ "dmard06", 0 },
	{ "dmard07", 0 },
	{ "dmard05" },
	{ "dmard06" },
	{ "dmard07" },
	{ }
};
MODULE_DEVICE_TABLE(i2c, dmard06_id);
Loading