diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/macintosh/via-pmu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index e31cb1e7a47b..1729d3fd7a11 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -2135,7 +2135,7 @@ static int powerbook_sleep_grackle(void) | |||
2135 | int ret; | 2135 | int ret; |
2136 | struct pci_dev *grackle; | 2136 | struct pci_dev *grackle; |
2137 | 2137 | ||
2138 | grackle = pci_find_slot(0, 0); | 2138 | grackle = pci_get_bus_and_slot(0, 0); |
2139 | if (!grackle) | 2139 | if (!grackle) |
2140 | return -ENODEV; | 2140 | return -ENODEV; |
2141 | 2141 | ||
@@ -2183,6 +2183,8 @@ static int powerbook_sleep_grackle(void) | |||
2183 | pmcr1 &= ~(GRACKLE_PM|GRACKLE_DOZE|GRACKLE_SLEEP|GRACKLE_NAP); | 2183 | pmcr1 &= ~(GRACKLE_PM|GRACKLE_DOZE|GRACKLE_SLEEP|GRACKLE_NAP); |
2184 | pci_write_config_word(grackle, 0x70, pmcr1); | 2184 | pci_write_config_word(grackle, 0x70, pmcr1); |
2185 | 2185 | ||
2186 | pci_dev_put(grackle); | ||
2187 | |||
2186 | /* Make sure the PMU is idle */ | 2188 | /* Make sure the PMU is idle */ |
2187 | pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,0); | 2189 | pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,0); |
2188 | restore_via_state(); | 2190 | restore_via_state(); |