summaryrefslogtreecommitdiff
path: root/drivers/usb/core/hcd-pci.c
diff options
context:
space:
mode:
authorKulikov Vasiliy <segooon@gmail.com>2010-07-03 20:04:47 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-10 14:35:38 -0700
commit402e8dd697d9dbfc40645148d0f539a43b6fc3a6 (patch)
treee628b265c776d28e9173a612854b6d6c11b2a8c3 /drivers/usb/core/hcd-pci.c
parent1e29709e2e577a862dbffe1c89f8033255a322bb (diff)
USB: core: hcd-pci: use for_each_pci_dev()
Use for_each_pci_dev() to simplify the code. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/hcd-pci.c')
-rw-r--r--drivers/usb/core/hcd-pci.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index fe6b8d40a506..c3f98543caaf 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -66,10 +66,7 @@ static void companion_common(struct pci_dev *pdev, struct usb_hcd *hcd,
* vice versa.
*/
companion = NULL;
- for (;;) {
- companion = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, companion);
- if (!companion)
- break;
+ for_each_pci_dev(companion) {
if (companion->bus != pdev->bus ||
PCI_SLOT(companion->devfn) != slot)
continue;