]> err.no Git - linux-2.6/blobdiff - drivers/macintosh/via-pmu.c
[POWERPC] via-pmu: remove LED sleep notifier
[linux-2.6] / drivers / macintosh / via-pmu.c
index e31cb1e7a47b70d124e9b59d8cfffa7471a916a0..157080b3b4688206eca50c71fc498aeeaf765c1f 100644 (file)
@@ -310,14 +310,14 @@ int __init find_via_pmu(void)
                        PMU_INT_TICK;
        
        if (vias->parent->name && ((strcmp(vias->parent->name, "ohare") == 0)
-           || device_is_compatible(vias->parent, "ohare")))
+           || of_device_is_compatible(vias->parent, "ohare")))
                pmu_kind = PMU_OHARE_BASED;
-       else if (device_is_compatible(vias->parent, "paddington"))
+       else if (of_device_is_compatible(vias->parent, "paddington"))
                pmu_kind = PMU_PADDINGTON_BASED;
-       else if (device_is_compatible(vias->parent, "heathrow"))
+       else if (of_device_is_compatible(vias->parent, "heathrow"))
                pmu_kind = PMU_HEATHROW_BASED;
-       else if (device_is_compatible(vias->parent, "Keylargo")
-                || device_is_compatible(vias->parent, "K2-Keylargo")) {
+       else if (of_device_is_compatible(vias->parent, "Keylargo")
+                || of_device_is_compatible(vias->parent, "K2-Keylargo")) {
                struct device_node *gpiop;
                struct device_node *adbp;
                u64 gaddr = OF_BAD_ADDR;
@@ -2135,7 +2135,7 @@ static int powerbook_sleep_grackle(void)
        int ret;
        struct pci_dev *grackle;
 
-       grackle = pci_find_slot(0, 0);
+       grackle = pci_get_bus_and_slot(0, 0);
        if (!grackle)
                return -ENODEV;
 
@@ -2183,6 +2183,8 @@ static int powerbook_sleep_grackle(void)
        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);
        restore_via_state();
@@ -2757,7 +2759,7 @@ pmu_polled_request(struct adb_request *req)
 
 #if defined(CONFIG_PM) && defined(CONFIG_PPC32)
 
-static int pmu_sys_suspended;
+int pmu_sys_suspended;
 
 static int pmu_sys_suspend(struct sys_device *sysdev, pm_message_t state)
 {