Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37627
b: refs/heads/master
c: edceeaf
h: refs/heads/master
i:
  37625: 1dcc38f
  37623: 9f33dda
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Oct 1, 2006
1 parent 248ce7c commit fc399a5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40cddf2cbd02aa830254afcd5a1a21b4e882a189
refs/heads/master: edceeaf50be1764db4aa7c1b19e540067a051e77
14 changes: 9 additions & 5 deletions trunk/drivers/macintosh/via-pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1827,7 +1827,7 @@ pbook_alloc_pci_save(void)
struct pci_dev *pd = NULL;

npci = 0;
while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
++npci;
}
if (npci == 0)
Expand Down Expand Up @@ -1857,9 +1857,11 @@ pbook_pci_save(void)
if (ps == NULL)
return;

while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
if (npci-- == 0)
while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
if (npci-- == 0) {
pci_dev_put(pd);
return;
}
#ifndef HACKED_PCI_SAVE
pci_read_config_word(pd, PCI_COMMAND, &ps->command);
pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat);
Expand Down Expand Up @@ -1887,11 +1889,13 @@ pbook_pci_restore(void)
int npci = pbook_npci_saves;
int j;

while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
#ifdef HACKED_PCI_SAVE
int i;
if (npci-- == 0)
if (npci-- == 0) {
pci_dev_put(pd);
return;
}
ps++;
for (i=2;i<16;i++)
pci_write_config_dword(pd, i<<4, ps->config[i]);
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/macintosh/via-pmu68k.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ pbook_pci_save(void)
struct pci_save *ps;

npci = 0;
while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL)
while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL)
++npci;
n_pbook_pci_saves = npci;
if (npci == 0)
Expand All @@ -854,7 +854,7 @@ pbook_pci_save(void)
return;

pd = NULL;
while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
pci_read_config_word(pd, PCI_COMMAND, &ps->command);
pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat);
pci_read_config_word(pd, PCI_INTERRUPT_LINE, &ps->intr);
Expand All @@ -871,7 +871,7 @@ pbook_pci_restore(void)
struct pci_dev *pd = NULL;
int j;

while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
if (ps->command == 0)
continue;
pci_read_config_word(pd, PCI_COMMAND, &cmd);
Expand Down

0 comments on commit fc399a5

Please sign in to comment.