Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Yijing Wang and committed by
Bjorn Helgaas
59c1ad3b f0197e0c

+2 -1
+2 -1
drivers/gpu/drm/drm_fops.c
··· 319 319 pci_dev_put(pci_dev); 320 320 } 321 321 if (!dev->hose) { 322 - struct pci_bus *b = pci_bus_b(pci_root_buses.next); 322 + struct pci_bus *b = list_entry(pci_root_buses.next, 323 + struct pci_bus, node); 323 324 if (b) 324 325 dev->hose = b->sysdata; 325 326 }