]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/macintosh/via-pmu.c
[POWERPC] Remove old interface find_devices
[karo-tx-linux.git] / drivers / macintosh / via-pmu.c
index 7b7db5db50dcb39b899e84b7704a67413bc26ed4..e31cb1e7a47b70d124e9b59d8cfffa7471a916a0 100644 (file)
@@ -487,7 +487,8 @@ static int __init via_pmu_dev_init(void)
                pmu_batteries[0].flags |= PMU_BATT_TYPE_SMART;
                pmu_batteries[1].flags |= PMU_BATT_TYPE_SMART;
        } else {
-               struct device_node* prim = find_devices("power-mgt");
+               struct device_node* prim =
+                       of_find_node_by_name(NULL, "power-mgt");
                const u32 *prim_info = NULL;
                if (prim)
                        prim_info = of_get_property(prim, "prim-info", NULL);
@@ -498,6 +499,7 @@ static int __init via_pmu_dev_init(void)
                        if (pmu_battery_count > 1)
                                pmu_batteries[1].flags |= PMU_BATT_TYPE_SMART;
                }
+               of_node_put(prim);
        }
 #endif /* CONFIG_PPC32 */