From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: linux-pci@vger.kernel.org
Cc: bhelgaas@google.com, Gavin Shan <gwshan@linux.vnet.ibm.com>
Subject: [PATCH] PCI: Fix device node for virtual bus
Date: Wed, 12 Nov 2014 13:42:43 +1100 [thread overview]
Message-ID: <1415760163-12517-1-git-send-email-gwshan@linux.vnet.ibm.com> (raw)
pci_set_bus_of_node() sets virtual PCI bus's device node to PHB's
device node wrongly. The patch fixes the issue.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
drivers/pci/of.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/of.c b/drivers/pci/of.c
index f092993..7b2256b 100644
--- a/drivers/pci/of.c
+++ b/drivers/pci/of.c
@@ -31,9 +31,9 @@ void pci_release_of_node(struct pci_dev *dev)
void pci_set_bus_of_node(struct pci_bus *bus)
{
- if (bus->self == NULL)
+ if (pci_is_root_bus(bus))
bus->dev.of_node = pcibios_get_phb_of_node(bus);
- else
+ else if (bus->self)
bus->dev.of_node = of_node_get(bus->self->dev.of_node);
}
--
1.8.3.2
next reply other threads:[~2014-11-12 2:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-12 2:42 Gavin Shan [this message]
2014-11-12 2:55 ` [PATCH] PCI: Fix device node for virtual bus Bjorn Helgaas
2014-11-12 3:11 ` Gavin Shan
2014-11-12 4:08 ` Bjorn Helgaas
2014-11-12 5:24 ` Gavin Shan
2014-11-12 19:02 ` Bjorn Helgaas
2014-11-13 0:45 ` Gavin Shan
2014-11-20 23:11 ` Bjorn Helgaas
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=1415760163-12517-1-git-send-email-gwshan@linux.vnet.ibm.com \
--to=gwshan@linux.vnet.ibm.com \
--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).