Skip to contentSkip to conversation

iio: adc: ti-ads1119: Drop explicit initialization of struct i2c_device_id::driver_data to 0

PATCH Applied Uwe Kleine-König 3 participants 3 messages Sep 20, 2024 – Sep 28, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: adc: ti-ads1119: 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.

---
 drivers/iio/adc/ti-ads1119.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ti-ads1119.c +1 -1
index 1c7606375149..e9d9d4d46d38 100644
@@ -804,7 +804,7 @@ static const struct of_device_id __maybe_unused ads1119_of_match[] = {
 MODULE_DEVICE_TABLE(of, ads1119_of_match);
 
 static const struct i2c_device_id ads1119_id[] = {
-	{ "ads1119", 0 },
+	{ "ads1119" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ads1119_id);

base-commit: 62f92d634458a1e308bb699986b9147a6d670457

Signature · 1 line
2.45.2
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Uwe Kleine-König

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.

Best Regards,
João Paulo

maintainer Applied
#2 lore raw
Quoted 11 lines · On Fri, 20 Sep 2024 18:18:47 +0200 João Paulo Gonçalves…
Quoted 8 lines · Uwe Kleine-König

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.

Applied.

Thanks,

Quoted 3 lines

Best Regards,
João Paulo