]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
misc: tifm: Use PCI_VDEVICE to initialize pci_device_id array
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Thu, 7 May 2026 08:04:02 +0000 (10:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 May 2026 11:47:33 +0000 (13:47 +0200)
The PCI_VDEVICE macro allows to assign the first four members of
pci_device_id more idiomatic and compact.

Also drop trailing zeros in the list initializer that the compiler takes
care of then. The driver doesn't use neither .class, .class_mask nor
.driver_data, so it's fine to not assign these explicitly.

There are no changes to the compiled data; confirmed using an x86 and an
arm64 build.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20260507080402.2672527-2-u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/tifm_7xx1.c

index 1d54680d6ed20e0265ab5ffe93b7c3ce0378ba79..4677d5a3094137ed67dc2896b9b5f6fc98f464cd 100644 (file)
@@ -400,12 +400,9 @@ static void tifm_7xx1_remove(struct pci_dev *dev)
 }
 
 static const struct pci_device_id tifm_7xx1_pci_tbl[] = {
-       { PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX21_XX11_FM, PCI_ANY_ID,
-         PCI_ANY_ID, 0, 0, 0 }, /* xx21 - the one I have */
-        { PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX12_FM, PCI_ANY_ID,
-         PCI_ANY_ID, 0, 0, 0 },
-       { PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX20_FM, PCI_ANY_ID,
-         PCI_ANY_ID, 0, 0, 0 },
+       { PCI_VDEVICE(TI, PCI_DEVICE_ID_TI_XX21_XX11_FM) }, /* xx21 - the one I have */
+       { PCI_VDEVICE(TI, PCI_DEVICE_ID_TI_XX12_FM) },
+       { PCI_VDEVICE(TI, PCI_DEVICE_ID_TI_XX20_FM) },
        { }
 };