From: Yinghai Lu <yinghai@kernel.org>
To: Bjorn Helgaas <bhelgaas@google.com>,
Jiang Liu <jiang.liu@huawei.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Taku Izumi <izumi.taku@jp.fujitsu.com>
Cc: linux-pci@vger.kernel.org, Yinghai Lu <yinghai@kernel.org>,
David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org
Subject: [PATCH v2 11/22] PCI, drm: Kill pci_root_buses in alpha hose setting
Date: Sat, 26 Jan 2013 21:36:32 -0800 [thread overview]
Message-ID: <1359265003-16166-12-git-send-email-yinghai@kernel.org> (raw)
In-Reply-To: <1359265003-16166-1-git-send-email-yinghai@kernel.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
---
drivers/gpu/drm/drm_fops.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index 133b413..b92a9cc 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -356,9 +356,13 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
pci_dev_put(pci_dev);
}
if (!dev->hose) {
- struct pci_bus *b = pci_bus_b(pci_root_buses.next);
- if (b)
- dev->hose = b->sysdata;
+ struct pci_host_bridge *host_bridge;
+
+ host_bridge = pci_next_host_bridge(NULL);
+ if (host_bridge) {
+ dev->hose = host_bridge->bus->sysdata;
+ put_device(&host_bridge->dev);
+ }
}
}
#endif
--
1.7.10.4
parent reply other threads:[~2013-01-27 5:36 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1359265003-16166-1-git-send-email-yinghai@kernel.org>]
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=1359265003-16166-12-git-send-email-yinghai@kernel.org \
--to=yinghai@kernel.org \
--cc=airlied@linux.ie \
--cc=bhelgaas@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=izumi.taku@jp.fujitsu.com \
--cc=jiang.liu@huawei.com \
--cc=linux-pci@vger.kernel.org \
--cc=rjw@sisk.pl \
/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