From: Yijing Wang <wangyijing@huawei.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Jiang Liu <jiang.liu@huawei.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Taku Izumi <izumi.taku@jp.fujitsu.com>,
Toshi Kani <toshi.kani@hp.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-pci@vger.kernel.org, David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 11/22] PCI, drm: Kill pci_root_buses in alpha hose setting
Date: Mon, 28 Jan 2013 11:21:10 +0800 [thread overview]
Message-ID: <5105EEA6.3020703@huawei.com> (raw)
In-Reply-To: <1359314629-18651-12-git-send-email-yinghai@kernel.org>
On 2013/1/28 3:23, Yinghai Lu wrote:
> Replace that with hotplug-safe version.
>
> 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);
pci_get_next_host_bridge() ?
> + if (host_bridge) {
> + dev->hose = host_bridge->bus->sysdata;
> + put_device(&host_bridge->dev);
> + }
> }
> }
> #endif
>
--
Thanks!
Yijing
next prev parent reply other threads:[~2013-01-28 3:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAE9FiQXHG01NjnYNDbC-KEpbcvY-q4pBe97CxTOGS7W4vZQBYQ@mail.gmail.com>
2013-01-27 19:23 ` [PATCH v3 00/22] PCI: Iterate pci host bridge instead of pci root bus Yinghai Lu
2013-01-27 19:23 ` [PATCH v3 02/22] PCI: Add dummy bus_type for pci_host_bridge Yinghai Lu
2013-01-27 19:23 ` [PATCH v3 05/22] PCI: Add for_each_pci_host_bridge() and pci_get_next_host_bridge Yinghai Lu
2013-01-27 19:23 ` [PATCH v3 11/22] PCI, drm: Kill pci_root_buses in alpha hose setting Yinghai Lu
2013-01-28 3:21 ` Yijing Wang [this message]
2013-01-28 3:35 ` Yinghai Lu
2013-01-27 19:23 ` [PATCH v3 21/22] PCI: Kill pci_find_next_bus Yinghai Lu
2013-01-27 19:23 ` [PATCH v3 22/22] PCI: Kill pci_root_buses Yinghai Lu
2013-02-02 21:50 ` [PATCH v3 00/22] PCI: Iterate pci host bridge instead of pci root bus 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=5105EEA6.3020703@huawei.com \
--to=wangyijing@huawei.com \
--cc=airlied@linux.ie \
--cc=bhelgaas@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=izumi.taku@jp.fujitsu.com \
--cc=jiang.liu@huawei.com \
--cc=linux-pci@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=toshi.kani@hp.com \
--cc=yinghai@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