Commit bafbedbf authored by Maximilian Attems's avatar Maximilian Attems Committed by David S. Miller

[SPARC64]: Use list_for_each in pci_sabre.c

Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 93d3379e
...@@ -1113,10 +1113,9 @@ static void __init sabre_base_address_update(struct pci_dev *pdev, int resource) ...@@ -1113,10 +1113,9 @@ static void __init sabre_base_address_update(struct pci_dev *pdev, int resource)
static void __init apb_init(struct pci_controller_info *p, struct pci_bus *sabre_bus) static void __init apb_init(struct pci_controller_info *p, struct pci_bus *sabre_bus)
{ {
struct list_head *walk = &sabre_bus->devices; struct pci_dev *pdev;
for (walk = walk->next; walk != &sabre_bus->devices; walk = walk->next) { list_for_each_entry(pdev, &sabre_bus->devices, bus_list) {
struct pci_dev *pdev = pci_dev_b(walk);
if (pdev->vendor == PCI_VENDOR_ID_SUN && if (pdev->vendor == PCI_VENDOR_ID_SUN &&
pdev->device == PCI_DEVICE_ID_SUN_SIMBA) { pdev->device == PCI_DEVICE_ID_SUN_SIMBA) {
...@@ -1178,10 +1177,9 @@ static struct pcidev_cookie *alloc_bridge_cookie(struct pci_pbm_info *pbm) ...@@ -1178,10 +1177,9 @@ static struct pcidev_cookie *alloc_bridge_cookie(struct pci_pbm_info *pbm)
static void __init sabre_scan_bus(struct pci_controller_info *p) static void __init sabre_scan_bus(struct pci_controller_info *p)
{ {
static int once; static int once;
struct pci_bus *sabre_bus; struct pci_bus *sabre_bus, *pbus;
struct pci_pbm_info *pbm; struct pci_pbm_info *pbm;
struct pcidev_cookie *cookie; struct pcidev_cookie *cookie;
struct list_head *walk;
int sabres_scanned; int sabres_scanned;
/* The APB bridge speaks to the Sabre host PCI bridge /* The APB bridge speaks to the Sabre host PCI bridge
...@@ -1217,9 +1215,7 @@ static void __init sabre_scan_bus(struct pci_controller_info *p) ...@@ -1217,9 +1215,7 @@ static void __init sabre_scan_bus(struct pci_controller_info *p)
sabres_scanned = 0; sabres_scanned = 0;
walk = &sabre_bus->children; list_for_each_entry(pbus, &sabre_bus->children, node) {
for (walk = walk->next; walk != &sabre_bus->children; walk = walk->next) {
struct pci_bus *pbus = pci_bus_b(walk);
if (pbus->number == p->pbm_A.pci_first_busno) { if (pbus->number == p->pbm_A.pci_first_busno) {
pbm = &p->pbm_A; pbm = &p->pbm_A;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment