]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mtd: Consistently define pci_device_ids
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Fri, 22 May 2026 17:32:34 +0000 (19:32 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 27 May 2026 09:11:04 +0000 (11:11 +0200)
commitad1bcd3469bdb2c5d75c8c29f1944b3ac0f12f92
treef4a8415289dac7f680fa6290bbde73708b8189a0
parent357e3b8e3a8769ba36eb8ec5e053e4825f1a9329
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>
drivers/mtd/maps/amd76xrom.c
drivers/mtd/maps/ck804xrom.c
drivers/mtd/maps/esb2rom.c
drivers/mtd/maps/ichxrom.c
drivers/mtd/maps/pci.c
drivers/mtd/maps/scb2_flash.c
drivers/mtd/nand/raw/cafe_nand.c
drivers/mtd/nand/raw/denali_pci.c
drivers/mtd/nand/raw/r852.c