From: Yijing Wang Date: Thu, 13 Feb 2014 13:14:00 +0000 (+0800) Subject: drm: Use list_for_each_entry() for bus traversal X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=59c1ad3b82b96bfcb40bf96ecff1d94f218fca6e;p=linux-beck.git 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 Signed-off-by: Bjorn Helgaas --- 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; }