From patchwork Sat Jul 3 16:04:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kulikov Vasiliy X-Patchwork-Id: 110034 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o63G68PV021609 for ; Sat, 3 Jul 2010 16:06:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755848Ab0GCQEk (ORCPT ); Sat, 3 Jul 2010 12:04:40 -0400 Received: from mail-ew0-f46.google.com ([209.85.215.46]:33284 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755759Ab0GCQEi (ORCPT ); Sat, 3 Jul 2010 12:04:38 -0400 Received: by mail-ew0-f46.google.com with SMTP id 23so1290969ewy.19 for ; Sat, 03 Jul 2010 09:04:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=RCNmdaAlv94FguKX9c46BoedE6HRi/dEzPqDpAUTHa0=; b=LfKx/JVEzJmqA7hMJUuuaNA/fEHNYTkpGNKpg5TarYRU3ebLQk++DeaOZ5veB9+1O6 h4p3Go0XnybASxqjr4cFHOnvyZtI1vqF2lcevkF7aWrlantanXgWKXzGXMZn4qOrx99J B3mWVktA5ZKvaMVU5AlKgwy04LkCIDbWsCs5A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=MojiuhdnIC8bMe55ZWaQlTPnii003rxIkuiIO6jY7B+pSTv0WkfiVxAPiJ0YTxk6hJ XVdOE77w1dNAZ7bRKBpAHGYJzF/zGWbj23ya0w4sfL2F2R8732VhywGME4oknIC0+Dqr TEBGQwh62rNPwGjyARVI9UshCjS8Io0jSys6I= Received: by 10.213.19.205 with SMTP id c13mr382036ebb.5.1278173077174; Sat, 03 Jul 2010 09:04:37 -0700 (PDT) Received: from localhost (ppp91-77-43-224.pppoe.mtu-net.ru [91.77.43.224]) by mx.google.com with ESMTPS id a48sm16608662eei.7.2010.07.03.09.04.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 03 Jul 2010 09:04:36 -0700 (PDT) From: Kulikov Vasiliy To: Kernel Janitors Cc: Jesse Barnes , Kenji Kaneshige , Huang Ying , Stefan Assmann , Andrew Patterson , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/19] drivers/pci: use for_each_pci_dev() Date: Sat, 3 Jul 2010 20:04:35 +0400 Message-Id: <1278173076-11949-1-git-send-email-segooon@gmail.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 03 Jul 2010 16:06:09 +0000 (UTC) diff --git a/drivers/pci/search.c b/drivers/pci/search.c index 20d03f7..9d75dc8 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c @@ -169,7 +169,7 @@ struct pci_dev *pci_get_domain_bus_and_slot(int domain, unsigned int bus, { struct pci_dev *dev = NULL; - while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { + for_each_pci_dev(dev) { if (pci_domain_nr(dev->bus) == domain && (dev->bus->number == bus && dev->devfn == devfn)) return dev;