]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Input: fm801-gp - simplify initialisation of pci_device_id array
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Thu, 7 May 2026 16:00:51 +0000 (18:00 +0200)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 7 May 2026 17:05:40 +0000 (10:05 -0700)
Instead of assigning the pci_device_id members using a list (which is
hard to read as you need to look at the order of the members in that
struct in parallel) use the PCI_VDEVICE() convenience macro to compact
the initialisation while improving readability.

Also drop trailing zeros that the compiler will care about then.

The change doesn't introduce binary changes to the compiled driver,
verified on both ARCH=x86 and ARCH=arm64.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20260507160051.3315630-2-u.kleine-koenig@baylibre.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/gameport/fm801-gp.c

index 423cccdea34f50750977c8f202fe38cb0eaee565..1e8c6c0448446b9ae24df17f2c344c882f2d11de 100644 (file)
@@ -125,8 +125,8 @@ static void fm801_gp_remove(struct pci_dev *pci)
 }
 
 static const struct pci_device_id fm801_gp_id_table[] = {
-       { PCI_VENDOR_ID_FORTEMEDIA, PCI_DEVICE_ID_FM801_GP, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0  },
-       { }
+       { PCI_VDEVICE(FORTEMEDIA, PCI_DEVICE_ID_FM801_GP) },
+       { }
 };
 MODULE_DEVICE_TABLE(pci, fm801_gp_id_table);