Przeglądaj źródła

Minor fixups

tags/v0.9.3
Michael Brown 19 lat temu
rodzic
commit
677cda3263
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3
    2
      src/drivers/bus/pci.c

+ 3
- 2
src/drivers/bus/pci.c Wyświetl plik

@@ -119,6 +119,7 @@ struct pci_device * pci_device ( struct dev *dev ) {
119 119
 
120 120
 	if ( dev->devid.bus_type != PCI_BUS_TYPE ) {
121 121
 		memset ( pci, 0, sizeof ( *pci ) );
122
+		dev->devid.bus_type = PCI_BUS_TYPE;
122 123
 	}
123 124
 	pci->dev = dev;
124 125
 	return pci;
@@ -153,8 +154,8 @@ int find_pci_device ( struct pci_device *pci,
153 154
 		/* Fill in dev structure, if present */
154 155
 		if ( pci->dev ) {
155 156
 			pci->dev->name = driver->name;
156
-			pci->dev->devid.vendor_id = pci->vendor;
157
-			pci->dev->devid.device_id = pci->dev_id;
157
+			pci->dev->devid.vendor_id = htons ( pci->vendor );
158
+			pci->dev->devid.device_id = htons ( pci->dev_id );
158 159
 		}
159 160
 
160 161
 		/* If driver has a class, and class matches, use it */

Ładowanie…
Anuluj
Zapisz