]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm: Use list_for_each_entry() for bus traversal
authorYijing Wang <wangyijing@huawei.com>
Thu, 13 Feb 2014 13:14:00 +0000 (21:14 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 14 Feb 2014 18:20:51 +0000 (11:20 -0700)
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>
drivers/gpu/drm/drm_fops.c

index 7f2af9aca03895b97c75af76968093a61930b501..309023f12d7ff7ab5413baf14af4f580c2a5ccbc 100644 (file)
@@ -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;
                }