linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI, EDAC: fix ordering assign resource and bus_add
@ 2013-05-07 23:29 Yinghai Lu
  2014-05-30 17:01 ` Bjorn Helgaas
  0 siblings, 1 reply; 5+ messages in thread
From: Yinghai Lu @ 2013-05-07 23:29 UTC (permalink / raw)
  To: Bjorn Helgaas, Doug Thompson
  Cc: linux-pci, linux-edac, linux-kernel, Yinghai Lu

We should assign unassigned resource before pci_bus_add_device.

as late one will enable driver and create sysfs file that will need
pci io resources from assign unassigned code.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 drivers/edac/i82875p_edac.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/edac/i82875p_edac.c
===================================================================
--- linux-2.6.orig/drivers/edac/i82875p_edac.c
+++ linux-2.6/drivers/edac/i82875p_edac.c
@@ -293,13 +293,14 @@ static int i82875p_setup_overfl_dev(stru
 		if (dev == NULL)
 			return 1;
 
+		pci_bus_assign_resources(dev->bus);
+
 		err = pci_bus_add_device(dev);
 		if (err) {
 			i82875p_printk(KERN_ERR,
 				"%s(): pci_bus_add_device() Failed\n",
 				__func__);
 		}
-		pci_bus_assign_resources(dev->bus);
 	}
 
 	*ovrfl_pdev = dev;

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-05-30 22:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-07 23:29 [PATCH] PCI, EDAC: fix ordering assign resource and bus_add Yinghai Lu
2014-05-30 17:01 ` Bjorn Helgaas
2014-05-30 21:46   ` Borislav Petkov
2014-05-30 22:00     ` Bjorn Helgaas
2014-05-30 22:21       ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).