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 6/7] PCI, sgihp: Using pci_hp_add_bridge
Date: Mon, 7 May 2012 13:29:15 -0700 [thread overview]
Message-ID: <1336422556-4124-7-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/sgi_hotplug.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c
index de57311..f64ca92 100644
--- a/drivers/pci/hotplug/sgi_hotplug.c
+++ b/drivers/pci/hotplug/sgi_hotplug.c
@@ -397,13 +397,11 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot)
else
sn_io_slot_fixup(dev);
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
- unsigned char sec_bus;
- pci_read_config_byte(dev, PCI_SECONDARY_BUS,
- &sec_bus);
- new_bus = pci_add_new_bus(dev->bus, dev,
- sec_bus);
- pci_scan_child_bus(new_bus);
- new_ppb = 1;
+ pci_hp_add_bridge(dev);
+ if (dev->subordinate) {
+ new_bus = dev->subordinate;
+ new_ppb = 1;
+ }
}
pci_dev_put(dev);
}
--
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 ` [PATCH 5/7] PCI, ibmhp: " Yinghai Lu
2012-05-07 20:29 ` Yinghai Lu [this message]
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-7-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).