aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/realtek/8139cp.c
diff options
context:
space:
mode:
authorVarka Bhadram <varkab@cdac.in>2014-07-22 23:49:49 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-23 17:56:40 -0400
commit96b3bff4c94cebc97726dc7f019cfc7ba3ced2e1 (patch)
treeb44df25409d3ae7041772b1569011c8dedcb9fc6 /drivers/net/ethernet/realtek/8139cp.c
parent5490c27218b8b8ea7b9fd7320587f5e65c027a6f (diff)
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>
Diffstat (limited to 'drivers/net/ethernet/realtek/8139cp.c')
-rw-r--r--drivers/net/ethernet/realtek/8139cp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
index be101ca8302e..75b1693ec8bf 100644
--- a/drivers/net/ethernet/realtek/8139cp.c
+++ b/drivers/net/ethernet/realtek/8139cp.c
@@ -382,13 +382,6 @@ static int cp_get_eeprom(struct net_device *dev,
382static int cp_set_eeprom(struct net_device *dev, 382static int cp_set_eeprom(struct net_device *dev,
383 struct ethtool_eeprom *eeprom, u8 *data); 383 struct ethtool_eeprom *eeprom, u8 *data);
384 384
385static 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};
390MODULE_DEVICE_TABLE(pci, cp_pci_tbl);
391
392static struct { 385static struct {
393 const char str[ETH_GSTRING_LEN]; 386 const char str[ETH_GSTRING_LEN];
394} ethtool_stats_keys[] = { 387} ethtool_stats_keys[] = {
@@ -2106,6 +2099,13 @@ static int cp_resume (struct pci_dev *pdev)
2106} 2099}
2107#endif /* CONFIG_PM */ 2100#endif /* CONFIG_PM */
2108 2101
2102static const struct pci_device_id cp_pci_tbl[] = {
2103 { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8139), },
2104 { PCI_DEVICE(PCI_VENDOR_ID_TTTECH, PCI_DEVICE_ID_TTTECH_MC322), },
2105 { },
2106};
2107MODULE_DEVICE_TABLE(pci, cp_pci_tbl);
2108
2109static struct pci_driver cp_driver = { 2109static struct pci_driver cp_driver = {
2110 .name = DRV_NAME, 2110 .name = DRV_NAME,
2111 .id_table = cp_pci_tbl, 2111 .id_table = cp_pci_tbl,