i82875p_edac: Assign PCI resources before adding device
Assign PCI resources before pci_bus_add_device(). The resources must be assigned before a driver can claim the device. [bhelgaas: changelog] Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
67d29b5c6c
commit
06b00514b7
@ -293,13 +293,14 @@ static int i82875p_setup_overfl_dev(struct pci_dev *pdev,
|
|||||||
if (dev == NULL)
|
if (dev == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
pci_bus_assign_resources(dev->bus);
|
||||||
|
|
||||||
err = pci_bus_add_device(dev);
|
err = pci_bus_add_device(dev);
|
||||||
if (err) {
|
if (err) {
|
||||||
i82875p_printk(KERN_ERR,
|
i82875p_printk(KERN_ERR,
|
||||||
"%s(): pci_bus_add_device() Failed\n",
|
"%s(): pci_bus_add_device() Failed\n",
|
||||||
__func__);
|
__func__);
|
||||||
}
|
}
|
||||||
pci_bus_assign_resources(dev->bus);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*ovrfl_pdev = dev;
|
*ovrfl_pdev = dev;
|
||||||
|
Loading…
Reference in New Issue
Block a user