Commit 5bddefad authored by Kulikov Vasiliy's avatar Kulikov Vasiliy Committed by Greg Kroah-Hartman

Staging: vt6655: use for_each_pci_dev()

Use for_each_pci_dev() to simplify the code.
Signed-off-by: default avatarKulikov Vasiliy <segooon@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 388bf2e8
...@@ -3655,7 +3655,7 @@ device_notify_reboot(struct notifier_block *nb, unsigned long event, void *p) ...@@ -3655,7 +3655,7 @@ device_notify_reboot(struct notifier_block *nb, unsigned long event, void *p)
case SYS_DOWN: case SYS_DOWN:
case SYS_HALT: case SYS_HALT:
case SYS_POWER_OFF: 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_dev_driver(pdev) == &device_driver) {
if (pci_get_drvdata(pdev)) if (pci_get_drvdata(pdev))
viawget_suspend(pdev, PMSG_HIBERNATE); viawget_suspend(pdev, PMSG_HIBERNATE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment