via-pmu: Switch to ref counting PCI API
PATCH 1/1 via-pmu: Switch to ref counting PCI API
Signed-off-by Alan Cox <[email protected]>
drivers/macintosh/via-pmu.c +3 -1
@@ -2130,7 +2130,7 @@int ret;struct pci_dev *grackle; - grackle =pci_find_slot (0 ,0 ); + grackle =pci_get_bus_and_slot (0 ,0 );if (!grackle)return -ENODEV ;
@@ -2177,6 +2177,8 @@pci_read_config_word (grackle,0x70 , &pmcr1); pmcr1 &= ~(GRACKLE_PM |GRACKLE_DOZE |GRACKLE_SLEEP |GRACKLE_NAP );pci_write_config_word (grackle,0x70 , pmcr1); + +pci_dev_put (grackle);/* Make sure the PMU is idle */ pmac_call_feature (PMAC_FTR_SLEEP_STATE ,NULL ,0 ,0 );