Commit b2345583 authored by Patrick Mochel's avatar Patrick Mochel

PCI: make sure the devices are named before they're registered.

parent 51d30bf5
...@@ -444,6 +444,8 @@ struct pci_dev * __devinit pci_scan_device(struct pci_dev *temp) ...@@ -444,6 +444,8 @@ struct pci_dev * __devinit pci_scan_device(struct pci_dev *temp)
return NULL; return NULL;
} }
pci_name_device(dev);
/* now put in global tree */ /* now put in global tree */
strcpy(dev->dev.name,dev->name); strcpy(dev->dev.name,dev->name);
strcpy(dev->dev.bus_id,dev->slot_name); strcpy(dev->dev.bus_id,dev->slot_name);
...@@ -471,7 +473,6 @@ struct pci_dev * __devinit pci_scan_slot(struct pci_dev *temp) ...@@ -471,7 +473,6 @@ struct pci_dev * __devinit pci_scan_slot(struct pci_dev *temp)
dev = pci_scan_device(temp); dev = pci_scan_device(temp);
if (!dev) if (!dev)
continue; continue;
pci_name_device(dev);
if (!func) { if (!func) {
is_multi = hdr_type & 0x80; is_multi = hdr_type & 0x80;
first_dev = dev; first_dev = dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment