aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/macintosh/via-pmu.c14
-rw-r--r--drivers/macintosh/via-pmu68k.c6
2 files changed, 12 insertions, 8 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index dda03985dcf5..80b89649e676 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -1827,7 +1827,7 @@ pbook_alloc_pci_save(void)
1827 struct pci_dev *pd = NULL; 1827 struct pci_dev *pd = NULL;
1828 1828
1829 npci = 0; 1829 npci = 0;
1830 while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) { 1830 while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
1831 ++npci; 1831 ++npci;
1832 } 1832 }
1833 if (npci == 0) 1833 if (npci == 0)
@@ -1857,9 +1857,11 @@ pbook_pci_save(void)
1857 if (ps == NULL) 1857 if (ps == NULL)
1858 return; 1858 return;
1859 1859
1860 while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) { 1860 while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
1861 if (npci-- == 0) 1861 if (npci-- == 0) {
1862 pci_dev_put(pd);
1862 return; 1863 return;
1864 }
1863#ifndef HACKED_PCI_SAVE 1865#ifndef HACKED_PCI_SAVE
1864 pci_read_config_word(pd, PCI_COMMAND, &ps->command); 1866 pci_read_config_word(pd, PCI_COMMAND, &ps->command);
1865 pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat); 1867 pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat);
@@ -1887,11 +1889,13 @@ pbook_pci_restore(void)
1887 int npci = pbook_npci_saves; 1889 int npci = pbook_npci_saves;
1888 int j; 1890 int j;
1889 1891
1890 while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) { 1892 while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
1891#ifdef HACKED_PCI_SAVE 1893#ifdef HACKED_PCI_SAVE
1892 int i; 1894 int i;
1893 if (npci-- == 0) 1895 if (npci-- == 0) {
1896 pci_dev_put(pd);
1894 return; 1897 return;
1898 }
1895 ps++; 1899 ps++;
1896 for (i=2;i<16;i++) 1900 for (i=2;i<16;i++)
1897 pci_write_config_dword(pd, i<<4, ps->config[i]); 1901 pci_write_config_dword(pd, i<<4, ps->config[i]);
diff --git a/drivers/macintosh/via-pmu68k.c b/drivers/macintosh/via-pmu68k.c
index 35b70323e7e3..9f4eff1d1a0f 100644
--- a/drivers/macintosh/via-pmu68k.c
+++ b/drivers/macintosh/via-pmu68k.c
@@ -843,7 +843,7 @@ pbook_pci_save(void)
843 struct pci_save *ps; 843 struct pci_save *ps;
844 844
845 npci = 0; 845 npci = 0;
846 while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) 846 while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL)
847 ++npci; 847 ++npci;
848 n_pbook_pci_saves = npci; 848 n_pbook_pci_saves = npci;
849 if (npci == 0) 849 if (npci == 0)
@@ -854,7 +854,7 @@ pbook_pci_save(void)
854 return; 854 return;
855 855
856 pd = NULL; 856 pd = NULL;
857 while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) { 857 while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
858 pci_read_config_word(pd, PCI_COMMAND, &ps->command); 858 pci_read_config_word(pd, PCI_COMMAND, &ps->command);
859 pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat); 859 pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat);
860 pci_read_config_word(pd, PCI_INTERRUPT_LINE, &ps->intr); 860 pci_read_config_word(pd, PCI_INTERRUPT_LINE, &ps->intr);
@@ -871,7 +871,7 @@ pbook_pci_restore(void)
871 struct pci_dev *pd = NULL; 871 struct pci_dev *pd = NULL;
872 int j; 872 int j;
873 873
874 while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) { 874 while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
875 if (ps->command == 0) 875 if (ps->command == 0)
876 continue; 876 continue;
877 pci_read_config_word(pd, PCI_COMMAND, &cmd); 877 pci_read_config_word(pd, PCI_COMMAND, &cmd);