Commit c78f8305 authored by Alan Cox's avatar Alan Cox Committed by Paul Mackerras

[POWERPC] via-pmu: Switch to ref counting PCI API

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent ab462768
...@@ -2135,7 +2135,7 @@ static int powerbook_sleep_grackle(void) ...@@ -2135,7 +2135,7 @@ static int powerbook_sleep_grackle(void)
int ret; int ret;
struct pci_dev *grackle; struct pci_dev *grackle;
grackle = pci_find_slot(0, 0); grackle = pci_get_bus_and_slot(0, 0);
if (!grackle) if (!grackle)
return -ENODEV; return -ENODEV;
...@@ -2183,6 +2183,8 @@ static int powerbook_sleep_grackle(void) ...@@ -2183,6 +2183,8 @@ static int powerbook_sleep_grackle(void)
pmcr1 &= ~(GRACKLE_PM|GRACKLE_DOZE|GRACKLE_SLEEP|GRACKLE_NAP); pmcr1 &= ~(GRACKLE_PM|GRACKLE_DOZE|GRACKLE_SLEEP|GRACKLE_NAP);
pci_write_config_word(grackle, 0x70, pmcr1); pci_write_config_word(grackle, 0x70, pmcr1);
pci_dev_put(grackle);
/* Make sure the PMU is idle */ /* Make sure the PMU is idle */
pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,0); pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,0);
restore_via_state(); restore_via_state();
......
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