projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e29709
)
USB: core: hcd-pci: use for_each_pci_dev()
author
Kulikov Vasiliy
<segooon@gmail.com>
Sat, 3 Jul 2010 16:04:47 +0000
(20:04 +0400)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 10 Aug 2010 21:35:38 +0000
(14:35 -0700)
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>
drivers/usb/core/hcd-pci.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/core/hcd-pci.c
b/drivers/usb/core/hcd-pci.c
index fe6b8d40a5064cc80e8c9dd655f5944e2877ddfc..c3f98543caaf9d3867fadc756db69346bba32a04 100644
(file)
--- 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;