Convert USB detection code to use struct pci_device.
[seabios.git] / src / pci.h
index a214bb1170190d86752a29fe847887790ad5e7a9..7aa2dfeb60f466489232e8fa3978baeb37e9a1fa 100644 (file)
--- a/src/pci.h
+++ b/src/pci.h
@@ -52,6 +52,9 @@ struct pci_device {
 extern struct pci_device *PCIDevices;
 extern int MaxPCIBus;
 void pci_probe(void);
+static inline u32 pci_classprog(struct pci_device *pci) {
+    return (pci->class << 8) | pci->prog_if;
+}
 
 #define foreachpci(PCI)                         \
     for (PCI=PCIDevices; PCI; PCI=PCI->next)