lkml.org 
[lkml]   [2012]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -v3 42/47] PCI: Add __pci_scan_root_bus() that can skip bus_add
Date
So could insert pus pci_assign_unassigned_bus_resources() before do bus_add.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/pci/probe.c | 13 ++++++++++---
include/linux/pci.h | 3 +++
2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 14f2e69..d626c4e 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1938,8 +1938,9 @@ void pci_bus_release_busn_res(struct pci_bus *b)
res, ret ? "can not be" : "is");
}

-struct pci_bus * __devinit pci_scan_root_bus(struct device *parent, int bus,
- struct pci_ops *ops, void *sysdata, struct list_head *resources)
+struct pci_bus * __devinit __pci_scan_root_bus(struct device *parent, int bus,
+ struct pci_ops *ops, void *sysdata, struct list_head *resources,
+ bool bus_add)
{
struct pci_bus *b;
struct pci_host_bridge_window *window, *n;
@@ -1970,9 +1971,15 @@ struct pci_bus * __devinit pci_scan_root_bus(struct device *parent, int bus,
if (!found)
pci_bus_update_busn_res_end(b, b->subordinate);

- pci_bus_add_devices(b);
+ if (bus_add)
+ pci_bus_add_devices(b);
return b;
}
+struct pci_bus * __devinit pci_scan_root_bus(struct device *parent, int bus,
+ struct pci_ops *ops, void *sysdata, struct list_head *resources)
+{
+ return __pci_scan_root_bus(parent, bus, ops, sysdata, resources, true);
+}
EXPORT_SYMBOL(pci_scan_root_bus);

/* Deprecated; use pci_scan_root_bus() instead */
diff --git a/include/linux/pci.h b/include/linux/pci.h
index aec945d..161f6c0 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -676,6 +676,9 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
void pci_bus_insert_busn_res(struct pci_bus *b, int bus, int busmax);
void pci_bus_update_busn_res_end(struct pci_bus *b, int busmax);
void pci_bus_release_busn_res(struct pci_bus *b);
+struct pci_bus * __devinit __pci_scan_root_bus(struct device *parent, int bus,
+ struct pci_ops *ops, void *sysdata, struct list_head *resources,
+ bool bus_add);
struct pci_bus * __devinit pci_scan_root_bus(struct device *parent, int bus,
struct pci_ops *ops, void *sysdata,
struct list_head *resources);
--
1.7.7


\
 
 \ /
  Last update: 2012-03-19 06:59    [W:0.184 / U:12.172 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site