aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2005-11-07 02:39:35 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-09 15:13:15 -0500
commitd08fa1a22e4b7240ac081ba57a67ce8e8cf94cc7 (patch)
tree6558c5f33c29b27b831efc6051a7056f718510e0 /arch
parent619daa2e4c80881d64875db22029a2181f07eaf9 (diff)
[PATCH] PCI: pci_find_device remove (sparc64/kernel/ebus.c)
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/kernel/ebus.c15
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();