aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-09 18:41:42 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-09 18:41:42 -0800
commit977127174a7dff52d17faeeb4c4949a54221881f (patch)
treeb05b9d18a1256d7ed97bdfb537213a8d70ccca57 /arch/sparc64
parent80c0531514516e43ae118ddf38424e06e5c3cb3c (diff)
parent93b47684f60cf25e8cefe19a21d94aa0257fdf36 (diff)
downloadkernel_samsung_aries-977127174a7dff52d17faeeb4c4949a54221881f.zip
kernel_samsung_aries-977127174a7dff52d17faeeb4c4949a54221881f.tar.gz
kernel_samsung_aries-977127174a7dff52d17faeeb4c4949a54221881f.tar.bz2
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
Diffstat (limited to 'arch/sparc64')
-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 6ffbeb7..7991e91 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)
{
struct pci_dev *pdev = start;
- do {
- pdev = pci_find_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev);
- if (pdev &&
- (pdev->device == PCI_DEVICE_ID_SUN_EBUS ||
- pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS))
+ while ((pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev)))
+ if (pdev->device == PCI_DEVICE_ID_SUN_EBUS ||
+ pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS)
break;
- } while (pdev != NULL);
- if (pdev && (pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS))
- *is_rio_p = 1;
- else
- *is_rio_p = 0;
+ *is_rio_p = !!(pdev && (pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS));
return pdev;
}
@@ -637,6 +631,7 @@ void __init ebus_init(void)
ebus->is_rio = is_rio;
++num_ebus;
}
+ pci_dev_put(pdev); /* XXX for the case, when ebusnd is 0, is it OK? */
#ifdef CONFIG_SUN_AUXIO
auxio_probe();