linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pci: Changed list_for_each to list_for_each_entry
@ 2008-08-18 16:43 Cordelia
  0 siblings, 0 replies; only message in thread
From: Cordelia @ 2008-08-18 16:43 UTC (permalink / raw)
  To: linux-kernel

Signed-off-by: Cordelia Sam <cordesam@gmail.com>
---
 drivers/pci/probe.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index a04498d..6a7ba36 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1245,13 +1245,11 @@ static int __init pci_sort_bf_cmp(const struct pci_dev *a, const struct pci_dev
  */
 static void __init pci_insertion_sort_klist(struct pci_dev *a, struct list_head *list)
 {
-	struct list_head *pos;
 	struct klist_node *n;
 	struct device *dev;
 	struct pci_dev *b;
 
-	list_for_each(pos, list) {
-		n = container_of(pos, struct klist_node, n_node);
+	list_for_each_entry(n, list, n_node) {
 		dev = container_of(n, struct device, knode_bus);
 		b = to_pci_dev(dev);
 		if (pci_sort_bf_cmp(a, b) <= 0) {
-- 
1.5.4.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-08-18 16:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-18 16:43 [PATCH] pci: Changed list_for_each to list_for_each_entry Cordelia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).