Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756127AbXLJQ5h (ORCPT ); Mon, 10 Dec 2007 11:57:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753828AbXLJQ53 (ORCPT ); Mon, 10 Dec 2007 11:57:29 -0500 Received: from mx1.riseup.net ([204.13.164.18]:42730 "EHLO mx1.riseup.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753565AbXLJQ53 (ORCPT ); Mon, 10 Dec 2007 11:57:29 -0500 Date: Mon, 10 Dec 2007 17:57:28 +0100 From: Matthias Kaehlcke To: gregkh@suse.de, linux-pci@atrey.karlin.mff.cuni.cz Cc: linux-kernel@vger.kernel.org, Andrew Morton Subject: [PATCH] acpi_pci_irq_find_prt_entry(): use list_for_each_entry() instead of list_for_each() Message-ID: <20071210165727.GA20186@traven> Mail-Followup-To: Matthias Kaehlcke , gregkh@suse.de, linux-pci@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org, Andrew Morton MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1725 Lines: 50 acpi_pci_irq_find_prt_entry(): use list_for_each_entry() instead of list_for_each() Signed-off-by: Matthias Kaehlcke -- diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index dd3186a..e51dac7 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) -- Matthias Kaehlcke Linux System Developer Barcelona Tant qu'il y aura sur terre des hommes pour qui existe un concept d' 'honneur national', la menace d'une nouvelle guerre subsistera (B. Traven) .''`. using free software / Debian GNU/Linux | http://debian.org : :' : `. `'` gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `- -- 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/