Skip to content

Commit d2a18bb

Browse files
andy-shevgregkh
authored andcommitted
sub: cdns2: Use predefined PCI vendor ID constant
The PCI vendor ID for Cadence is defined in pci_ids.h. Use it. While at it, move to PCI_DEVICE() macro and usual pattern for PCI class and device IDs. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9390762 commit d2a18bb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/usb/gadget/udc/cdns2/cdns2-pci.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
#include "cdns2-gadget.h"
1616

1717
#define PCI_DRIVER_NAME "cdns-pci-usbhs"
18-
#define CDNS_VENDOR_ID 0x17cd
19-
#define CDNS_DEVICE_ID 0x0120
18+
#define PCI_DEVICE_ID_CDNS_USB2 0x0120
2019
#define PCI_BAR_DEV 0
2120
#define PCI_DEV_FN_DEVICE 0
2221

@@ -114,8 +113,8 @@ static const struct dev_pm_ops cdns2_pci_pm_ops = {
114113
};
115114

116115
static const struct pci_device_id cdns2_pci_ids[] = {
117-
{ PCI_VENDOR_ID_CDNS, CDNS_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,
118-
PCI_CLASS_SERIAL_USB_DEVICE, PCI_ANY_ID },
116+
{ PCI_DEVICE(PCI_VENDOR_ID_CDNS, PCI_DEVICE_ID_CDNS_USB2),
117+
.class = PCI_CLASS_SERIAL_USB_DEVICE },
119118
{ 0, }
120119
};
121120

0 commit comments

Comments
 (0)