Skip to content

Commit

Permalink
net: macb: Use predefined PCI vendor ID constant
Browse files Browse the repository at this point in the history
The PCI vendor ID for Cadence is defined in pci_ids.h. Use it.
While at it, move to PCI_VDEVICE() macro and usual pattern for
PCI device ID.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20240913125146.3628751-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
andy-shev authored and kuba-moo committed Sep 14, 2024
1 parent 9c699a8 commit 6503734
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/ethernet/cadence/macb_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
#define PCI_DRIVER_NAME "macb_pci"
#define PLAT_DRIVER_NAME "macb"

#define CDNS_VENDOR_ID 0x17cd
#define CDNS_DEVICE_ID 0xe007
#define PCI_DEVICE_ID_CDNS_MACB 0xe007

#define GEM_PCLK_RATE 50000000
#define GEM_HCLK_RATE 50000000
Expand Down Expand Up @@ -117,7 +116,7 @@ static void macb_remove(struct pci_dev *pdev)
}

static const struct pci_device_id dev_id_table[] = {
{ PCI_DEVICE(CDNS_VENDOR_ID, CDNS_DEVICE_ID), },
{ PCI_VDEVICE(CDNS, PCI_DEVICE_ID_CDNS_MACB) },
{ 0, }
};

Expand Down

0 comments on commit 6503734

Please sign in to comment.