From: Kulikov Vasiliy <segooon@gmail.com>
To: Kernel Janitors <kernel-janitors@vger.kernel.org>
Cc: Samuel Ortiz <samuel@sortiz.org>,
"David S. Miller" <davem@davemloft.net>,
Stephen Hemminger <shemminger@vyatta.com>,
Jiri Kosina <jkosina@suse.cz>, Joe Perches <joe@perches.com>,
Eric Dumazet <eric.dumazet@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 11/19] drivers/net/irda: use for_each_pci_dev()
Date: Sat, 3 Jul 2010 20:04:15 +0400 [thread overview]
Message-ID: <1278173056-11779-1-git-send-email-segooon@gmail.com> (raw)
Use for_each_pci_dev() to simplify the code.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
drivers/net/irda/smsc-ircc2.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
index d67e484..850ca1c 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -2848,9 +2848,7 @@ static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg,
unsigned short ss_device = 0x0000;
int ret = 0;
- dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev);
-
- while (dev != NULL) {
+ for_each_pci_dev(dev) {
struct smsc_ircc_subsystem_configuration *conf;
/*
@@ -2899,7 +2897,6 @@ static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg,
ret = -ENODEV;
}
}
- dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev);
}
return ret;
--
1.7.0.4
next reply other threads:[~2010-07-03 16:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-03 16:04 Kulikov Vasiliy [this message]
2010-07-20 15:33 ` [PATCH 11/19] drivers/net/irda: use for_each_pci_dev() Jiri Kosina
2010-07-21 21:04 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1278173056-11779-1-git-send-email-segooon@gmail.com \
--to=segooon@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jkosina@suse.cz \
--cc=joe@perches.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=samuel@sortiz.org \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).