[pci] Provide PCI_CLASS() to calculate a scalar PCI class value

Rename PCI_CLASS() (which constructs a struct pci_class_id) to
PCI_CLASS_ID(), and provide PCI_CLASS() as a macro which constructs
the 24-bit scalar value of a PCI class code.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2015-05-08 14:54:12 +01:00
parent 50e703a534
commit b88ab14ba3
4 changed files with 17 additions and 9 deletions

View File

@@ -1877,8 +1877,8 @@ static struct pci_device_id ehci_ids[] = {
struct pci_driver ehci_driver __pci_driver = {
.ids = ehci_ids,
.id_count = ( sizeof ( ehci_ids ) / sizeof ( ehci_ids[0] ) ),
.class = PCI_CLASS ( PCI_CLASS_SERIAL, PCI_CLASS_SERIAL_USB,
PCI_CLASS_SERIAL_USB_EHCI ),
.class = PCI_CLASS_ID ( PCI_CLASS_SERIAL, PCI_CLASS_SERIAL_USB,
PCI_CLASS_SERIAL_USB_EHCI ),
.probe = ehci_probe,
.remove = ehci_remove,
};