From: Yinghai Lu <yinghai@kernel.org>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org, Yinghai Lu <yinghai@kernel.org>
Subject: [PATCH 5/7] PCI, ibmhp: Using pci_hp_add_bridge
Date: Mon, 7 May 2012 13:29:14 -0700 [thread overview]
Message-ID: <1336422556-4124-6-git-send-email-yinghai@kernel.org> (raw)
In-Reply-To: <1336422556-4124-1-git-send-email-yinghai@kernel.org>
instead of open code with pci_add_new_bus()/do_scan_bus...
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/pci/hotplug/ibmphp_core.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
index 4fda7e6..7dccad5 100644
--- a/drivers/pci/hotplug/ibmphp_core.c
+++ b/drivers/pci/hotplug/ibmphp_core.c
@@ -775,7 +775,6 @@ static u8 bus_structure_fixup(u8 busno)
static int ibm_configure_device(struct pci_func *func)
{
- unsigned char bus;
struct pci_bus *child;
int num;
int flag = 0; /* this is to make sure we don't double scan the bus,
@@ -805,9 +804,10 @@ static int ibm_configure_device(struct pci_func *func)
}
}
if (!(flag) && (func->dev->hdr_type == PCI_HEADER_TYPE_BRIDGE)) {
- pci_read_config_byte(func->dev, PCI_SECONDARY_BUS, &bus);
- child = pci_add_new_bus(func->dev->bus, func->dev, bus);
- pci_do_scan_bus(child);
+ pci_hp_add_bridge(func->dev);
+ child = func->dev->subordinate;
+ if (child)
+ pci_bus_add_devices(child);
}
return 0;
--
1.7.7
next prev parent reply other threads:[~2012-05-07 20:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-07 20:29 [PATCH 0/7] PCI: hotplug bridge replated clean up Yinghai Lu
2012-05-07 20:29 ` [PATCH 1/7] PCI, pciehp: Separate pci_hp_add_bridge() Yinghai Lu
2012-05-07 20:29 ` [PATCH 2/7] PCI, cpci_hotplug: Simplify configure_slot Yinghai Lu
2012-05-07 20:29 ` [PATCH 3/7] PCI, shpchp: Simplify configure_device Yinghai Lu
2012-05-07 20:29 ` [PATCH 4/7] PCI, cpqhp: Using pci_hp_add_bridge Yinghai Lu
2012-05-07 20:29 ` Yinghai Lu [this message]
2012-05-07 20:29 ` [PATCH 6/7] PCI, sgihp: " Yinghai Lu
2012-05-07 20:29 ` [PATCH 7/7] PCI, hotplug: remove pci_do_scan_bus() Yinghai Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1336422556-4124-6-git-send-email-yinghai@kernel.org \
--to=yinghai@kernel.org \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).