Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ethernet: realtek: use pci_device_id

This patch use the struct pci_device_id instead of using macro
DEFINE_PCI_DEVICE_TABLE which is deprecated and should not be used.
And also moves these ids after probe and remove functionalities.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Varka Bhadram and committed by
David S. Miller
96b3bff4 5490c272

+7 -7
+7 -7
drivers/net/ethernet/realtek/8139cp.c
··· 382 382 static int cp_set_eeprom(struct net_device *dev, 383 383 struct ethtool_eeprom *eeprom, u8 *data); 384 384 385 - static DEFINE_PCI_DEVICE_TABLE(cp_pci_tbl) = { 386 - { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8139), }, 387 - { PCI_DEVICE(PCI_VENDOR_ID_TTTECH, PCI_DEVICE_ID_TTTECH_MC322), }, 388 - { }, 389 - }; 390 - MODULE_DEVICE_TABLE(pci, cp_pci_tbl); 391 - 392 385 static struct { 393 386 const char str[ETH_GSTRING_LEN]; 394 387 } ethtool_stats_keys[] = { ··· 2098 2105 return 0; 2099 2106 } 2100 2107 #endif /* CONFIG_PM */ 2108 + 2109 + static const struct pci_device_id cp_pci_tbl[] = { 2110 + { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8139), }, 2111 + { PCI_DEVICE(PCI_VENDOR_ID_TTTECH, PCI_DEVICE_ID_TTTECH_MC322), }, 2112 + { }, 2113 + }; 2114 + MODULE_DEVICE_TABLE(pci, cp_pci_tbl); 2101 2115 2102 2116 static struct pci_driver cp_driver = { 2103 2117 .name = DRV_NAME,