Skip to contentSkip to conversation

drivers/staging/vt6655: use for_each_pci_dev()

PATCH Applied Kulikov Vasiliy 1 participant 1 message Jul 3, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 18/19 drivers/staging/vt6655: use for_each_pci_dev()

Use for_each_pci_dev() to simplify the code.

---
 drivers/staging/vt6655/device_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/vt6655/device_main.c +1 -1
index 0d697d0..d498442 100644
@@ -3655,7 +3655,7 @@ device_notify_reboot(struct notifier_block *nb, unsigned long event, void *p)
     case SYS_DOWN:
     case SYS_HALT:
     case SYS_POWER_OFF:
-        while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
+	for_each_pci_dev(pdev) {
             if(pci_dev_driver(pdev) = &device_driver) {
                 if (pci_get_drvdata(pdev))
                     viawget_suspend(pdev, PMSG_HIBERNATE);
Signature · 1 line
1.7.0.4