[PATCH 3/6] PCI/drm: Use list_for_each_entry() for bus traversal
Yijing Wang
wangyijing at huawei.com
Fri Feb 14 00:14:00 EST 2014
Replace list_for_each() + pci_bus_b() with the simpler
list_for_each_entry().
Signed-off-by: Yijing Wang <wangyijing at huawei.com>
---
drivers/gpu/drm/drm_fops.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index 7f2af9a..70d2987 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -319,7 +319,8 @@ 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);
+ struct pci_bus *b = list_entry(pci_root_buses.next,
+ struct pci_bus, node);
if (b)
dev->hose = b->sysdata;
}
--
1.7.1
More information about the Linuxppc-dev
mailing list