]> err.no Git - linux-2.6/commitdiff
ACPI: acpi_pci_irq_find_prt_entry(): use list_for_each_entry() instead of list_for_each()
authorMatthias Kaehlcke <matthias.kaehlcke@gmail.com>
Tue, 5 Feb 2008 07:31:20 +0000 (23:31 -0800)
committerLen Brown <len.brown@intel.com>
Thu, 7 Feb 2008 05:51:06 +0000 (00:51 -0500)
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/pci_irq.c

index 62010c2481b3614b9b9ddd3e1cbbae2118f40fd7..76d9c669d2d8e4e7cc9662e3f3ea8c68148b059d 100644 (file)
@@ -51,10 +51,8 @@ static struct acpi_prt_entry *acpi_pci_irq_find_prt_entry(int segment,
                                                          int bus,
                                                          int device, int pin)
 {
-       struct list_head *node = NULL;
        struct acpi_prt_entry *entry = NULL;
 
-
        if (!acpi_prt.count)
                return NULL;
 
@@ -64,8 +62,7 @@ static struct acpi_prt_entry *acpi_pci_irq_find_prt_entry(int segment,
         *
         */
        spin_lock(&acpi_prt_lock);
-       list_for_each(node, &acpi_prt.entries) {
-               entry = list_entry(node, struct acpi_prt_entry, node);
+       list_for_each_entry(entry, &acpi_prt.entries, node) {
                if ((segment == entry->id.segment)
                    && (bus == entry->id.bus)
                    && (device == entry->id.device)