summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>2026-05-12 14:50:34 +0200
committerJonathan Cameron <jic23@kernel.org>2026-05-31 10:59:39 +0100
commit3f439a2a5b37e9d72a8f4eb6974adbe7c34e1a4a (patch)
tree737b872a0914d711000c70e3200ad7a1713f4f5c /drivers
parent0ce8e3b445a3fec83a023f11512f63ff6da0d460 (diff)
iio: Drop unused driver_data in four i2c drivers
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/adc/pac1921.c2
-rw-r--r--drivers/iio/light/apds9160.c2
-rw-r--r--drivers/iio/light/tsl2563.c8
-rw-r--r--drivers/iio/light/tsl2583.c6
4 files changed, 9 insertions, 9 deletions
diff --git a/drivers/iio/adc/pac1921.c b/drivers/iio/adc/pac1921.c
index bce7185953ec..68bdd2f30bad 100644
--- a/drivers/iio/adc/pac1921.c
+++ b/drivers/iio/adc/pac1921.c
@@ -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);
diff --git a/drivers/iio/light/apds9160.c b/drivers/iio/light/apds9160.c
index 3da0bdac04cf..8dacb1730429 100644
--- a/drivers/iio/light/apds9160.c
+++ b/drivers/iio/light/apds9160.c
@@ -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);
diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
index f2af1cd7c2d1..7e277bc6a8b1 100644
--- a/drivers/iio/light/tsl2563.c
+++ b/drivers/iio/light/tsl2563.c
@@ -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);
diff --git a/drivers/iio/light/tsl2583.c b/drivers/iio/light/tsl2583.c
index 8801a491de77..a0dd122af2cf 100644
--- a/drivers/iio/light/tsl2583.c
+++ b/drivers/iio/light/tsl2583.c
@@ -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);