From: Matthias Kaehlcke Date: Tue, 5 Feb 2008 07:31:20 +0000 (-0800) Subject: ACPI: acpi_pci_irq_find_prt_entry(): use list_for_each_entry() instead of list_for_each() X-Git-Tag: v2.6.25-rc1~297^2~3^2~2^2~1^2~1^3~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a3b77ae60f19fa85f4cdc34b6c09efb1a18372c;p=linux-2.6 ACPI: acpi_pci_irq_find_prt_entry(): use list_for_each_entry() instead of list_for_each() Signed-off-by: Matthias Kaehlcke Signed-off-by: Andrew Morton Signed-off-by: Len Brown --- diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 62010c2481..76d9c669d2 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c @@ -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)