Explicitly assigning 0 to driver_data in drivers not using this member
has no benefit. Drop these and similarly depend on the compiler to
zero-initialize the list terminator.
This is a preparation for making struct pci_device_id::driver_data an
anonymous union (which makes initializing using a list expression fail),
but it's also a nice cleanup by itself.
It was verified on x86 and arm64 that this change doesn't introduce
changes to the compiled drivers.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
drivers/char/hw_random/amd-rng.c | 6 +++---
drivers/char/hw_random/cavium-rng.c | 4 ++--
drivers/char/hw_random/geode-rng.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/char/hw_random/amd-rng.c b/drivers/char/hw_random/amd-rng.c
index 332d594bdf70..dff80daae587 100644
--- a/drivers/char/hw_random/amd-rng.c
+++ b/drivers/char/hw_random/amd-rng.c
@@ -47,9 +47,9 @@
* want to register another driver on the same PCI id.
*/
static const struct pci_device_id pci_tbl[] = {
- { PCI_VDEVICE(AMD, 0x7443), 0, },
- { PCI_VDEVICE(AMD, 0x746b), 0, },
- { 0, }, /* terminate list */
+ { PCI_VDEVICE(AMD, 0x7443) },
+ { PCI_VDEVICE(AMD, 0x746b) },
+ { } /* terminate list */
};
MODULE_DEVICE_TABLE(pci, pci_tbl);
diff --git a/drivers/char/hw_random/cavium-rng.c b/drivers/char/hw_random/cavium-rng.c
index d9d7b6038c06..3e2c042009f6 100644
--- a/drivers/char/hw_random/cavium-rng.c
+++ b/drivers/char/hw_random/cavium-rng.c
@@ -73,8 +73,8 @@ static void cavium_rng_remove(struct pci_dev *pdev)
}
static const struct pci_device_id cavium_rng_pf_id_table[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, 0xa018), 0, 0, 0}, /* Thunder RNM */
- {0,},
+ { PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, 0xa018) }, /* Thunder RNM */
+ { },
};
MODULE_DEVICE_TABLE(pci, cavium_rng_pf_id_table);
diff --git a/drivers/char/hw_random/geode-rng.c b/drivers/char/hw_random/geode-rng.c
index 1b21d58e1768..ae63eff64344 100644
--- a/drivers/char/hw_random/geode-rng.c
+++ b/drivers/char/hw_random/geode-rng.c
@@ -46,8 +46,8 @@
* want to register another driver on the same PCI id.
*/
static const struct pci_device_id pci_tbl[] = {
- { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_LX_AES), 0, },
- { 0, }, /* terminate list */
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_LX_AES) },
+ { } /* terminate list */
};
MODULE_DEVICE_TABLE(pci, pci_tbl);
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
--
2.47.3