summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_fops.c
diff options
context:
space:
mode:
authorYijing Wang <wangyijing@huawei.com>2014-02-13 14:14:00 +0100
committerBjorn Helgaas <bhelgaas@google.com>2014-02-14 19:20:51 +0100
commit59c1ad3b82b96bfcb40bf96ecff1d94f218fca6e (patch)
tree6cdfbeb0b1bbdb523c38bc5fe048a1a33e654404 /drivers/gpu/drm/drm_fops.c
parentARM/PCI: Use list_for_each_entry() for bus traversal (diff)
downloadlinux-59c1ad3b82b96bfcb40bf96ecff1d94f218fca6e.tar.xz
linux-59c1ad3b82b96bfcb40bf96ecff1d94f218fca6e.zip
drm: Use list_for_each_entry() for bus traversal
Replace list_for_each() + pci_bus_b() with list_for_each_entry(). Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/gpu/drm/drm_fops.c')
-rw-r--r--drivers/gpu/drm/drm_fops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index 7f2af9aca038..309023f12d7f 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;
}