Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756003Ab0GCQKX (ORCPT ); Sat, 3 Jul 2010 12:10:23 -0400 Received: from mail-ew0-f46.google.com ([209.85.215.46]:39669 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755676Ab0GCQKR (ORCPT ); Sat, 3 Jul 2010 12:10:17 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=lo3YpT4qLa5Vqmzn267oIWaBK0IwybDhaw42gUyQkYXM4VHf1UBrZWLd8E8s8wyYEY c+/UgCbCIIxYx7v7PelPjm/PIcANuXVW2V0ye3j5v+4lHYWqc4k0EZw1LuWrhb9lN3qq bzMGdRzsrahqgyIjxgmw5O6PXIHf567n7r01U= From: Kulikov Vasiliy To: Kernel Janitors Cc: Ramkrishna Vepa , Rastapur Santosh , Sivakumar Subramani , Sreenivasa Honnur , "David S. Miller" , Joe Perches , Jiri Pirko , Neil Horman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/19] drivers/net: use for_each_pci_dev() Date: Sat, 3 Jul 2010 20:04:19 +0400 Message-Id: <1278173061-11813-1-git-send-email-segooon@gmail.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 978 Lines: 28 Use for_each_pci_dev() to simplify the code. Signed-off-by: Kulikov Vasiliy --- drivers/net/s2io.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 22371f1..5c2bd50 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -1094,7 +1094,7 @@ static int s2io_verify_pci_mode(struct s2io_nic *nic) static int s2io_on_nec_bridge(struct pci_dev *s2io_pdev) { struct pci_dev *tdev = NULL; - while ((tdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, tdev)) != NULL) { + for_each_pci_dev(tdev) { if (tdev->vendor == NEC_VENID && tdev->device == NEC_DEVID) { if (tdev->bus == s2io_pdev->bus->parent) { pci_dev_put(tdev); -- 1.7.0.4 -- 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/