summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>2026-06-19 17:54:40 +0200
committerJonathan Cameron <jic23@kernel.org>2026-06-30 00:15:56 +0100
commit91cf4be76708e9880f40c91ca1cb7b266334c332 (patch)
treeb8a625f00c9cba2ab46a5123069f0d3bfd80e279
parent0a20c840d69b9489535099db541b744a678e0784 (diff)
downloadlinux-stable-91cf4be76708e9880f40c91ca1cb7b266334c332.tar.gz
linux-stable-91cf4be76708e9880f40c91ca1cb7b266334c332.zip
staging: iio: Drop unused assignment of spi_device_id driver data
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@baylibre.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/staging/iio/addac/adt7316-spi.c13
-rw-r--r--drivers/staging/iio/frequency/ad9832.c4
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);