mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
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>
This commit is contained in:
parent
0a20c840d6
commit
91cf4be767
|
|
@ -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[] = {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user