ChangeSet 1.1276.22.21, 2003/08/22 15:41:55-07:00, greg@kroah.com [PATCH] USB: change pci host drivers to use PCI_DEVICE_CLASS() macro. drivers/usb/host/ehci-hcd.c | 17 ++++------------- drivers/usb/host/ohci-pci.c | 11 +---------- drivers/usb/host/uhci-hcd.c | 11 +---------- 3 files changed, 6 insertions(+), 33 deletions(-) diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c --- a/drivers/usb/host/ehci-hcd.c Tue Sep 2 12:46:55 2003 +++ b/drivers/usb/host/ehci-hcd.c Tue Sep 2 12:46:55 2003 @@ -979,21 +979,12 @@ /* EHCI spec says PCI is required. */ /* PCI driver selection metadata; PCI hotplugging uses this */ -static struct pci_device_id pci_ids [] = { { - +static const struct pci_device_id pci_ids [] = { { /* handle any USB 2.0 EHCI controller */ - - .class = ((PCI_CLASS_SERIAL_USB << 8) | 0x20), - .class_mask = ~0, + PCI_DEVICE_CLASS(((PCI_CLASS_SERIAL_USB << 8) | 0x20), ~0), .driver_data = (unsigned long) &ehci_driver, - - /* no matter who makes it */ - .vendor = PCI_ANY_ID, - .device = PCI_ANY_ID, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - -}, { /* end: all zeroes */ } + }, + { /* end: all zeroes */ } }; MODULE_DEVICE_TABLE (pci, pci_ids); diff -Nru a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c --- a/drivers/usb/host/ohci-pci.c Tue Sep 2 12:46:55 2003 +++ b/drivers/usb/host/ohci-pci.c Tue Sep 2 12:46:55 2003 @@ -351,18 +351,9 @@ static const struct pci_device_id pci_ids [] = { { - /* handle any USB OHCI controller */ - .class = (PCI_CLASS_SERIAL_USB << 8) | 0x10, - .class_mask = ~0, + PCI_DEVICE_CLASS((PCI_CLASS_SERIAL_USB << 8) | 0x10, ~0), .driver_data = (unsigned long) &ohci_pci_hc_driver, - - /* no matter who makes it */ - .vendor = PCI_ANY_ID, - .device = PCI_ANY_ID, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - }, { /* end: all zeroes */ } }; MODULE_DEVICE_TABLE (pci, pci_ids); diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c --- a/drivers/usb/host/uhci-hcd.c Tue Sep 2 12:46:55 2003 +++ b/drivers/usb/host/uhci-hcd.c Tue Sep 2 12:46:55 2003 @@ -2504,18 +2504,9 @@ }; static const struct pci_device_id uhci_pci_ids[] = { { - /* handle any USB UHCI controller */ - .class = ((PCI_CLASS_SERIAL_USB << 8) | 0x00), - .class_mask = ~0, + PCI_DEVICE_CLASS(((PCI_CLASS_SERIAL_USB << 8) | 0x00), ~0), .driver_data = (unsigned long) &uhci_driver, - - /* no matter who makes it */ - .vendor = PCI_ANY_ID, - .device = PCI_ANY_ID, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - }, { /* end: all zeroes */ } };