diff options
author | Yijing Wang <wangyijing@huawei.com> | 2014-02-13 13:14:00 (GMT) |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-02-14 18:20:51 (GMT) |
commit | 59c1ad3b82b96bfcb40bf96ecff1d94f218fca6e (patch) | |
tree | 6cdfbeb0b1bbdb523c38bc5fe048a1a33e654404 /drivers/gpu/drm/drm_fops.c | |
parent | f0197e0cc6c68c4498cd9008db33b3ba4c3b11ba (diff) | |
download | linux-59c1ad3b82b96bfcb40bf96ecff1d94f218fca6e.tar.xz |
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.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..309023f 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; } |