summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>2026-05-22 19:32:34 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2026-05-27 11:11:04 +0200
commitad1bcd3469bdb2c5d75c8c29f1944b3ac0f12f92 (patch)
treef4a8415289dac7f680fa6290bbde73708b8189a0 /drivers/mtd/nand
parent357e3b8e3a8769ba36eb8ec5e053e4825f1a9329 (diff)
mtd: Consistently define pci_device_ids
Initializing a pci_device_id using plain list expressions is hard to understand for a human who isn't into the Linux PCI subsystem. So for each initializer use one of the PCI_DEVICE macros for .vendor, .device, .subvendor and .subdevice and named initializers for the remaining assignments. This makes it easier to parse and also more robust against chagnes to the struct definition. Also drop useless zeros and commas. The mentioned robustness is relevant for a planned change to struct pci_device_id that replaces .driver_data by an anonymous union. This change doesn't introduce changes to the compiled pci_device_id array. Tested on x86 and arm64. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/raw/cafe_nand.c3
-rw-r--r--drivers/mtd/nand/raw/denali_pci.c4
-rw-r--r--drivers/mtd/nand/raw/r852.c4
3 files changed, 5 insertions, 6 deletions
diff --git a/drivers/mtd/nand/raw/cafe_nand.c b/drivers/mtd/nand/raw/cafe_nand.c
index c4018bc59670..f3117b031cd2 100644
--- a/drivers/mtd/nand/raw/cafe_nand.c
+++ b/drivers/mtd/nand/raw/cafe_nand.c
@@ -830,8 +830,7 @@ static void cafe_nand_remove(struct pci_dev *pdev)
}
static const struct pci_device_id cafe_nand_tbl[] = {
- { PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_88ALP01_NAND,
- PCI_ANY_ID, PCI_ANY_ID },
+ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_88ALP01_NAND) },
{ }
};
diff --git a/drivers/mtd/nand/raw/denali_pci.c b/drivers/mtd/nand/raw/denali_pci.c
index 97fa32d73441..f53df1b32dda 100644
--- a/drivers/mtd/nand/raw/denali_pci.c
+++ b/drivers/mtd/nand/raw/denali_pci.c
@@ -19,8 +19,8 @@
/* List of platforms this NAND controller has be integrated into */
static const struct pci_device_id denali_pci_ids[] = {
- { PCI_VDEVICE(INTEL, 0x0701), INTEL_CE4100 },
- { PCI_VDEVICE(INTEL, 0x0809), INTEL_MRST },
+ { PCI_VDEVICE(INTEL, 0x0701), .driver_data = INTEL_CE4100 },
+ { PCI_VDEVICE(INTEL, 0x0809), .driver_data = INTEL_MRST },
{ /* end: all zeroes */ }
};
MODULE_DEVICE_TABLE(pci, denali_pci_ids);
diff --git a/drivers/mtd/nand/raw/r852.c b/drivers/mtd/nand/raw/r852.c
index 8a5572b30893..92c47d351c27 100644
--- a/drivers/mtd/nand/raw/r852.c
+++ b/drivers/mtd/nand/raw/r852.c
@@ -1070,8 +1070,8 @@ static int r852_resume(struct device *device)
static const struct pci_device_id r852_pci_id_tbl[] = {
- { PCI_VDEVICE(RICOH, 0x0852), },
- { },
+ { PCI_VDEVICE(RICOH, 0x0852) },
+ { }
};
MODULE_DEVICE_TABLE(pci, r852_pci_id_tbl);