[PATCH 1/4] pci: fix device registration for directly attached devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit b8a1bb1dd215770670108fe5b0de0e5e137bf8fd
 ("pci: defer device registration until after bridge setup")
removed pci_register_device() from setup_device() to allow
bridges to be registered before attached sub-devices.

This breaks normal registration for devices that are not
connected through a bridge. Fix this by calling pci_register_device()
for normal devices again.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@xxxxxxxxx>
---
Cc: barebox@xxxxxxxxxxxxxxxxxxx
Cc: Lucas Stach <dev@xxxxxxxxxx>
---
 drivers/pci/pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index d6e95c3ec894..c633d138ca66 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -344,6 +344,7 @@ unsigned int pci_scan_bus(struct pci_bus *bus)
 			dev->rom_address = (l == 0xffffffff) ? 0 : l;
 
 			setup_device(dev, 6);
+			pci_register_device(dev);
 			break;
 		case PCI_HEADER_TYPE_BRIDGE:
 			setup_device(dev, 2);
-- 
2.1.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux