mirror of
https://github.com/ipxe/ipxe
synced 2025-12-14 16:01:38 +03:00
Minor fixups
This commit is contained in:
@@ -119,6 +119,7 @@ struct pci_device * pci_device ( struct dev *dev ) {
|
|||||||
|
|
||||||
if ( dev->devid.bus_type != PCI_BUS_TYPE ) {
|
if ( dev->devid.bus_type != PCI_BUS_TYPE ) {
|
||||||
memset ( pci, 0, sizeof ( *pci ) );
|
memset ( pci, 0, sizeof ( *pci ) );
|
||||||
|
dev->devid.bus_type = PCI_BUS_TYPE;
|
||||||
}
|
}
|
||||||
pci->dev = dev;
|
pci->dev = dev;
|
||||||
return pci;
|
return pci;
|
||||||
@@ -153,8 +154,8 @@ int find_pci_device ( struct pci_device *pci,
|
|||||||
/* Fill in dev structure, if present */
|
/* Fill in dev structure, if present */
|
||||||
if ( pci->dev ) {
|
if ( pci->dev ) {
|
||||||
pci->dev->name = driver->name;
|
pci->dev->name = driver->name;
|
||||||
pci->dev->devid.vendor_id = pci->vendor;
|
pci->dev->devid.vendor_id = htons ( pci->vendor );
|
||||||
pci->dev->devid.device_id = pci->dev_id;
|
pci->dev->devid.device_id = htons ( pci->dev_id );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If driver has a class, and class matches, use it */
|
/* If driver has a class, and class matches, use it */
|
||||||
|
|||||||
Reference in New Issue
Block a user