Commit 52d3f347 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] PCI: remove usage of pci_for_each_dev() in drivers/macintosh/via-pmu.c

parent a68ffd7b
...@@ -1713,10 +1713,10 @@ static void __pmac ...@@ -1713,10 +1713,10 @@ static void __pmac
pbook_alloc_pci_save(void) pbook_alloc_pci_save(void)
{ {
int npci; int npci;
struct pci_dev *pd; struct pci_dev *pd = NULL;
npci = 0; npci = 0;
pci_for_each_dev(pd) { while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
++npci; ++npci;
} }
if (npci == 0) if (npci == 0)
...@@ -1740,13 +1740,13 @@ static void __pmac ...@@ -1740,13 +1740,13 @@ static void __pmac
pbook_pci_save(void) pbook_pci_save(void)
{ {
struct pci_save *ps = pbook_pci_saves; struct pci_save *ps = pbook_pci_saves;
struct pci_dev *pd; struct pci_dev *pd = NULL;
int npci = pbook_npci_saves; int npci = pbook_npci_saves;
if (ps == NULL) if (ps == NULL)
return; return;
pci_for_each_dev(pd) { while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
if (npci-- == 0) if (npci-- == 0)
return; return;
#ifndef HACKED_PCI_SAVE #ifndef HACKED_PCI_SAVE
...@@ -1772,11 +1772,11 @@ pbook_pci_restore(void) ...@@ -1772,11 +1772,11 @@ pbook_pci_restore(void)
{ {
u16 cmd; u16 cmd;
struct pci_save *ps = pbook_pci_saves - 1; struct pci_save *ps = pbook_pci_saves - 1;
struct pci_dev *pd; struct pci_dev *pd = NULL;
int npci = pbook_npci_saves; int npci = pbook_npci_saves;
int j; int j;
pci_for_each_dev(pd) { while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
#ifdef HACKED_PCI_SAVE #ifdef HACKED_PCI_SAVE
int i; int i;
if (npci-- == 0) if (npci-- == 0)
......
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