Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59c1ad3b authored by Yijing Wang's avatar Yijing Wang Committed by Bjorn Helgaas
Browse files

drm: Use list_for_each_entry() for bus traversal



Replace list_for_each() + pci_bus_b() with list_for_each_entry().

Signed-off-by: default avatarYijing Wang <wangyijing@huawei.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent f0197e0c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
		}