* [PATCH v3, part2 14/20] PCI, DRM: use hotplug-safe iterators to walk PCI buses [not found] <1369583597-3801-1-git-send-email-jiang.liu@huawei.com> @ 2013-05-26 15:53 ` Jiang Liu 2013-06-17 18:08 ` Bjorn Helgaas 0 siblings, 1 reply; 2+ messages in thread From: Jiang Liu @ 2013-05-26 15:53 UTC (permalink / raw) To: Bjorn Helgaas, Yinghai Lu Cc: Jiang Liu, Rafael J . Wysocki, Greg Kroah-Hartman, Gu Zheng, Toshi Kani, Myron Stowe, Yijing Wang, Jiang Liu, linux-pci, linux-kernel, David Airlie, dri-devel Enhance DRM drvier to use hotplug-safe iterators to walk PCI buses. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org --- drivers/gpu/drm/drm_fops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index 429e07d..dc8c40b 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c @@ -359,9 +359,11 @@ 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) + struct pci_bus *b = pci_get_next_root_bus(NULL); + if (b) { dev->hose = b->sysdata; + pci_bus_put(b); + } } } #endif -- 1.8.1.2 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3, part2 14/20] PCI, DRM: use hotplug-safe iterators to walk PCI buses 2013-05-26 15:53 ` [PATCH v3, part2 14/20] PCI, DRM: use hotplug-safe iterators to walk PCI buses Jiang Liu @ 2013-06-17 18:08 ` Bjorn Helgaas 0 siblings, 0 replies; 2+ messages in thread From: Bjorn Helgaas @ 2013-06-17 18:08 UTC (permalink / raw) To: Jiang Liu Cc: Yinghai Lu, Jiang Liu, Rafael J . Wysocki, Greg Kroah-Hartman, Gu Zheng, Toshi Kani, Myron Stowe, Yijing Wang, linux-pci, linux-kernel, David Airlie, dri-devel On Sun, May 26, 2013 at 11:53:11PM +0800, Jiang Liu wrote: > Enhance DRM drvier to use hotplug-safe iterators to walk PCI buses. > > Signed-off-by: Jiang Liu <jiang.liu@huawei.com> > Cc: David Airlie <airlied@linux.ie> > Cc: dri-devel@lists.freedesktop.org > Cc: linux-kernel@vger.kernel.org > --- > drivers/gpu/drm/drm_fops.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c > index 429e07d..dc8c40b 100644 > --- a/drivers/gpu/drm/drm_fops.c > +++ b/drivers/gpu/drm/drm_fops.c > @@ -359,9 +359,11 @@ 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) > + struct pci_bus *b = pci_get_next_root_bus(NULL); > + if (b) { > dev->hose = b->sysdata; > + pci_bus_put(b); > + } This is a gross hack to begin with, and it would be far better to get rid of the whole "#ifdef __alpha__" block that contains this code. I can't believe alpha is so special that it needs to do something that no other arch needs. > } > } > #endif > -- > 1.8.1.2 > ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-17 18:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1369583597-3801-1-git-send-email-jiang.liu@huawei.com>
2013-05-26 15:53 ` [PATCH v3, part2 14/20] PCI, DRM: use hotplug-safe iterators to walk PCI buses Jiang Liu
2013-06-17 18:08 ` Bjorn Helgaas
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).