diff options
Diffstat (limited to 'arch/sparc64/kernel/ebus.c')
-rw-r--r-- | arch/sparc64/kernel/ebus.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c index 6ffbeb701940..7991e919d8ab 100644 --- a/arch/sparc64/kernel/ebus.c +++ b/arch/sparc64/kernel/ebus.c | |||
@@ -527,18 +527,12 @@ static struct pci_dev *find_next_ebus(struct pci_dev *start, int *is_rio_p) | |||
527 | { | 527 | { |
528 | struct pci_dev *pdev = start; | 528 | struct pci_dev *pdev = start; |
529 | 529 | ||
530 | do { | 530 | while ((pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev))) |
531 | pdev = pci_find_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev); | 531 | if (pdev->device == PCI_DEVICE_ID_SUN_EBUS || |
532 | if (pdev && | 532 | pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS) |
533 | (pdev->device == PCI_DEVICE_ID_SUN_EBUS || | ||
534 | pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS)) | ||
535 | break; | 533 | break; |
536 | } while (pdev != NULL); | ||
537 | 534 | ||
538 | if (pdev && (pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS)) | 535 | *is_rio_p = !!(pdev && (pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS)); |
539 | *is_rio_p = 1; | ||
540 | else | ||
541 | *is_rio_p = 0; | ||
542 | 536 | ||
543 | return pdev; | 537 | return pdev; |
544 | } | 538 | } |
@@ -637,6 +631,7 @@ void __init ebus_init(void) | |||
637 | ebus->is_rio = is_rio; | 631 | ebus->is_rio = is_rio; |
638 | ++num_ebus; | 632 | ++num_ebus; |
639 | } | 633 | } |
634 | pci_dev_put(pdev); /* XXX for the case, when ebusnd is 0, is it OK? */ | ||
640 | 635 | ||
641 | #ifdef CONFIG_SUN_AUXIO | 636 | #ifdef CONFIG_SUN_AUXIO |
642 | auxio_probe(); | 637 | auxio_probe(); |