lkml.org 
[lkml]   [2005]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 7/7] arch: pci_find_device remove (sparc64/kernel/ebus.c)
From
Generated in 2.6.13-rc6-mm2 kernel version.

Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>

ebus.c | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c
--- a/arch/sparc64/kernel/ebus.c
+++ b/arch/sparc64/kernel/ebus.c
@@ -527,19 +527,13 @@ static struct pci_dev *find_next_ebus(st
{
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();
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-08-30 00:33    [W:0.110 / U:0.732 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site