]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: Drop unused driver_data in four i2c drivers
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Tue, 12 May 2026 12:50:34 +0000 (14:50 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 31 May 2026 09:59:39 +0000 (10:59 +0100)
For the four drivers the .driver_data member of i2c_device_id is
write-only. Drop the explicit assignment.

While touching these arrays use a named initializer to assign the .name
member, which is easier to parse for a human.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/pac1921.c
drivers/iio/light/apds9160.c
drivers/iio/light/tsl2563.c
drivers/iio/light/tsl2583.c

index bce7185953ecbbe4419d3155a2f12c8c1bbc78cd..68bdd2f30badaff65b33b9a29371ba08d0de6147 100644 (file)
@@ -1310,7 +1310,7 @@ static int pac1921_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id pac1921_id[] = {
-       { .name = "pac1921", 0 },
+       { .name = "pac1921" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, pac1921_id);
index 3da0bdac04cf7bf39e3fb8687d709f33c3316db8..8dacb17304298b7674010d8d918e26ac6e42af93 100644 (file)
@@ -1572,7 +1572,7 @@ static const struct of_device_id apds9160_of_match[] = {
 MODULE_DEVICE_TABLE(of, apds9160_of_match);
 
 static const struct i2c_device_id apds9160_id[] = {
-       { "apds9160", 0 },
+       { .name = "apds9160" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, apds9160_id);
index f2af1cd7c2d1ffb58b8b80a20540a35c3d621488..7e277bc6a8b1fe19302a89689e740e9cdfb3a83f 100644 (file)
@@ -839,10 +839,10 @@ static DEFINE_SIMPLE_DEV_PM_OPS(tsl2563_pm_ops, tsl2563_suspend,
                                tsl2563_resume);
 
 static const struct i2c_device_id tsl2563_id[] = {
-       { "tsl2560", 0 },
-       { "tsl2561", 1 },
-       { "tsl2562", 2 },
-       { "tsl2563", 3 },
+       { .name = "tsl2560" },
+       { .name = "tsl2561" },
+       { .name = "tsl2562" },
+       { .name = "tsl2563" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, tsl2563_id);
index 8801a491de77b58d63be7ccfb5edca3a4ada453e..a0dd122af2cfb85cabe87fb6a2855eebc70e02af 100644 (file)
@@ -913,9 +913,9 @@ static DEFINE_RUNTIME_DEV_PM_OPS(tsl2583_pm_ops, tsl2583_suspend,
                                 tsl2583_resume, NULL);
 
 static const struct i2c_device_id tsl2583_idtable[] = {
-       { "tsl2580", 0 },
-       { "tsl2581", 1 },
-       { "tsl2583", 2 },
+       { .name = "tsl2580" },
+       { .name = "tsl2581" },
+       { .name = "tsl2583" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, tsl2583_idtable);