child->bus = dev->bus;
fill_ebus_child(node, ®s[0], child);
- while ((node = prom_getsibling(node))) {
+ while ((node = prom_getsibling(node)) != 0) {
child->next = (struct linux_ebus_child *)
ebus_alloc(sizeof(struct linux_ebus_child));
}
}
- pdev = pci_find_device(PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_EBUS, 0);
+ pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_EBUS, 0);
if (!pdev) {
return;
}
dev->bus = ebus;
fill_ebus_device(nd, dev);
- while ((nd = prom_getsibling(nd))) {
+ while ((nd = prom_getsibling(nd)) != 0) {
dev->next = (struct linux_ebus_device *)
ebus_alloc(sizeof(struct linux_ebus_device));
}
next_ebus:
- pdev = pci_find_device(PCI_VENDOR_ID_SUN,
+ pdev = pci_get_device(PCI_VENDOR_ID_SUN,
PCI_DEVICE_ID_SUN_EBUS, pdev);
if (!pdev)
break;
ebus->next = 0;
++num_ebus;
}
+ if (pdev)
+ pci_dev_put(pdev);
}