[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1369583597-3801-15-git-send-email-jiang.liu@huawei.com>
Date: Sun, 26 May 2013 23:53:11 +0800
From: Jiang Liu <liuj97@...il.com>
To: Bjorn Helgaas <bhelgaas@...gle.com>,
Yinghai Lu <yinghai@...nel.org>
Cc: Jiang Liu <jiang.liu@...wei.com>,
"Rafael J . Wysocki" <rjw@...k.pl>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Gu Zheng <guz.fnst@...fujitsu.com>,
Toshi Kani <toshi.kani@...com>,
Myron Stowe <myron.stowe@...hat.com>,
Yijing Wang <wangyijing@...wei.com>,
Jiang Liu <liuj97@...il.com>, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org, David Airlie <airlied@...ux.ie>,
dri-devel@...ts.freedesktop.org
Subject: [PATCH v3, part2 14/20] PCI, DRM: use hotplug-safe iterators to walk PCI buses
Enhance DRM drvier to use hotplug-safe iterators to walk PCI buses.
Signed-off-by: Jiang Liu <jiang.liu@...wei.com>
Cc: David Airlie <airlied@...ux.ie>
Cc: dri-devel@...ts.freedesktop.org
Cc: linux-kernel@...r.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists