[PATCH v1 12/13] staging: iio: Drop unused assignment of spi_device_id driver data

From: Uwe Kleine-König (The Capable Hub)

Date: Fri Jun 19 2026 - 12:06:21 EST


The drivers explicitly set the .driver_data member of struct
spi_device_id to zero without relying on that value. Drop these unused
assignments.

While touching these arrays use named initializers for .name.

This patch doesn't modify the compiled arrays, only their representation
in source form benefits. The former was confirmed with x86 and arm64
builds.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
---
drivers/staging/iio/addac/adt7316-spi.c | 13 ++++++-------
drivers/staging/iio/frequency/ad9832.c | 4 ++--
2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/iio/addac/adt7316-spi.c b/drivers/staging/iio/addac/adt7316-spi.c
index 1debcc36c1af..459dd7416b1d 100644
--- a/drivers/staging/iio/addac/adt7316-spi.c
+++ b/drivers/staging/iio/addac/adt7316-spi.c
@@ -126,15 +126,14 @@ static int adt7316_spi_probe(struct spi_device *spi_dev)
}

static const struct spi_device_id adt7316_spi_id[] = {
- { "adt7316", 0 },
- { "adt7317", 0 },
- { "adt7318", 0 },
- { "adt7516", 0 },
- { "adt7517", 0 },
- { "adt7519", 0 },
+ { .name = "adt7316" },
+ { .name = "adt7317" },
+ { .name = "adt7318" },
+ { .name = "adt7516" },
+ { .name = "adt7517" },
+ { .name = "adt7519" },
{ }
};
-
MODULE_DEVICE_TABLE(spi, adt7316_spi_id);

static const struct of_device_id adt7316_of_spi_match[] = {
diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c
index 659821a1e2cb..1a6666c1948e 100644
--- a/drivers/staging/iio/frequency/ad9832.c
+++ b/drivers/staging/iio/frequency/ad9832.c
@@ -381,8 +381,8 @@ static const struct of_device_id ad9832_of_match[] = {
MODULE_DEVICE_TABLE(of, ad9832_of_match);

static const struct spi_device_id ad9832_id[] = {
- {"ad9832", 0},
- {"ad9835", 0},
+ { .name = "ad9832" },
+ { .name = "ad9835" },
{ }
};
MODULE_DEVICE_TABLE(spi, ad9832_id);
--
2.47.3