]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
use no_pci_devices() in pci/search.c
authorAndrew Morton <akpm@linux-foundation.org>
Mon, 16 Jul 2007 06:39:40 +0000 (23:39 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 16 Jul 2007 16:05:41 +0000 (09:05 -0700)
We have an API function for this now.

Cc: Zhang Yanmin <yanmin.zhang@intel.com>
Cc: Greg KH <greg@kroah.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/pci/search.c

index 9f7090fa8771401c954782eec3e052f5e29e7770..c6e79d01ce3d1a8e4f747a762f8e052712320102 100644 (file)
@@ -202,7 +202,7 @@ static struct pci_dev * pci_find_subsys(unsigned int vendor,
         * can cause some machines to crash.  So here we detect and flag that
         * situation and bail out early.
         */
-       if (unlikely(list_empty(&pci_devices)))
+       if (unlikely(no_pci_devices()))
                return NULL;
        down_read(&pci_bus_sem);
        n = from ? from->global_list.next : pci_devices.next;
@@ -277,7 +277,7 @@ pci_get_subsys(unsigned int vendor, unsigned int device,
         * can cause some machines to crash.  So here we detect and flag that
         * situation and bail out early.
         */
-       if (unlikely(list_empty(&pci_devices)))
+       if (unlikely(no_pci_devices()))
                return NULL;
        down_read(&pci_bus_sem);
        n = from ? from->global_list.next : pci_devices.next;