]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
r8169: use PCI_VDEVICE macro
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 19 Nov 2018 21:35:08 +0000 (22:35 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Nov 2018 01:32:14 +0000 (17:32 -0800)
Using macro PCI_VDEVICE helps to simplify the PCI ID table.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c

index 5d6eb38c635b8506b262bff18f1fa72bc01c2d9a..243aa60ad4c0bbab23323833f3d0c967bc8bec13 100644 (file)
@@ -212,24 +212,24 @@ enum cfg_version {
 };
 
 static const struct pci_device_id rtl8169_pci_tbl[] = {
-       { PCI_DEVICE(PCI_VENDOR_ID_REALTEK,     0x8129), 0, 0, RTL_CFG_0 },
-       { PCI_DEVICE(PCI_VENDOR_ID_REALTEK,     0x8136), 0, 0, RTL_CFG_2 },
-       { PCI_DEVICE(PCI_VENDOR_ID_REALTEK,     0x8161), 0, 0, RTL_CFG_1 },
-       { PCI_DEVICE(PCI_VENDOR_ID_REALTEK,     0x8167), 0, 0, RTL_CFG_0 },
-       { PCI_DEVICE(PCI_VENDOR_ID_REALTEK,     0x8168), 0, 0, RTL_CFG_1 },
-       { PCI_DEVICE(PCI_VENDOR_ID_NCUBE,       0x8168), 0, 0, RTL_CFG_1 },
-       { PCI_DEVICE(PCI_VENDOR_ID_REALTEK,     0x8169), 0, 0, RTL_CFG_0 },
-       { PCI_VENDOR_ID_DLINK,                  0x4300,
-               PCI_VENDOR_ID_DLINK, 0x4b10,             0, 0, RTL_CFG_1 },
-       { PCI_DEVICE(PCI_VENDOR_ID_DLINK,       0x4300), 0, 0, RTL_CFG_0 },
-       { PCI_DEVICE(PCI_VENDOR_ID_DLINK,       0x4302), 0, 0, RTL_CFG_0 },
-       { PCI_DEVICE(PCI_VENDOR_ID_AT,          0xc107), 0, 0, RTL_CFG_0 },
-       { PCI_DEVICE(PCI_VENDOR_ID_USR,         0x0116), 0, 0, RTL_CFG_0 },
+       { PCI_VDEVICE(REALTEK,  0x8129), RTL_CFG_0 },
+       { PCI_VDEVICE(REALTEK,  0x8136), RTL_CFG_2 },
+       { PCI_VDEVICE(REALTEK,  0x8161), RTL_CFG_1 },
+       { PCI_VDEVICE(REALTEK,  0x8167), RTL_CFG_0 },
+       { PCI_VDEVICE(REALTEK,  0x8168), RTL_CFG_1 },
+       { PCI_VDEVICE(NCUBE,    0x8168), RTL_CFG_1 },
+       { PCI_VDEVICE(REALTEK,  0x8169), RTL_CFG_0 },
+       { PCI_VENDOR_ID_DLINK,  0x4300,
+               PCI_VENDOR_ID_DLINK, 0x4b10, 0, 0, RTL_CFG_1 },
+       { PCI_VDEVICE(DLINK,    0x4300), RTL_CFG_0 },
+       { PCI_VDEVICE(DLINK,    0x4302), RTL_CFG_0 },
+       { PCI_VDEVICE(AT,       0xc107), RTL_CFG_0 },
+       { PCI_VDEVICE(USR,      0x0116), RTL_CFG_0 },
        { PCI_VENDOR_ID_LINKSYS,                0x1032,
                PCI_ANY_ID, 0x0024, 0, 0, RTL_CFG_0 },
        { 0x0001,                               0x8168,
                PCI_ANY_ID, 0x2410, 0, 0, RTL_CFG_2 },
-       {0,},
+       {}
 };
 
 MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);