mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 08:26:59 +00:00
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>
This commit is contained in:
parent
f0197e0cc6
commit
59c1ad3b82
1 changed files with 2 additions and 1 deletions
|
@ -319,7 +319,8 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
|
||||||
pci_dev_put(pci_dev);
|
pci_dev_put(pci_dev);
|
||||||
}
|
}
|
||||||
if (!dev->hose) {
|
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)
|
if (b)
|
||||||
dev->hose = b->sysdata;
|
dev->hose = b->sysdata;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue