Loading arch/powerpc/kernel/prom.c +0 −19 Original line number Diff line number Diff line Loading @@ -1091,25 +1091,6 @@ struct device_node *find_devices(const char *name) } EXPORT_SYMBOL(find_devices); /** * Construct and return a list of the device_nodes with a given type. */ struct device_node *find_type_devices(const char *type) { struct device_node *head, **prevp, *np; prevp = &head; for (np = allnodes; np != 0; np = np->allnext) { if (np->type != 0 && strcasecmp(np->type, type) == 0) { *prevp = np; prevp = &np->next; } } *prevp = NULL; return head; } EXPORT_SYMBOL(find_type_devices); /** Checks if the given "compat" string matches one of the strings in * the device's "compatible" property */ Loading arch/powerpc/platforms/chrp/setup.c +4 −2 Original line number Diff line number Diff line Loading @@ -226,12 +226,12 @@ static void __init pegasos_set_l2cr(void) return; /* Enable L2 cache if needed */ np = find_type_devices("cpu"); np = of_find_node_by_type(NULL, "cpu"); if (np != NULL) { const unsigned int *l2cr = of_get_property(np, "l2cr", NULL); if (l2cr == NULL) { printk ("Pegasos l2cr : no cpu l2cr property found\n"); return; goto out; } if (!((*l2cr) & 0x80000000)) { printk ("Pegasos l2cr : L2 cache was not active, " Loading @@ -240,6 +240,8 @@ static void __init pegasos_set_l2cr(void) _set_L2CR((*l2cr) | 0x80000000); } } out: of_node_put(np); } static void briq_restart(char *cmd) Loading arch/powerpc/platforms/powermac/cpufreq_32.c +2 −1 Original line number Diff line number Diff line Loading @@ -658,7 +658,7 @@ static int __init pmac_cpufreq_setup(void) return 0; /* Assume only one CPU */ cpunode = find_type_devices("cpu"); cpunode = of_find_node_by_type(NULL, "cpu"); if (!cpunode) goto out; Loading Loading @@ -708,6 +708,7 @@ static int __init pmac_cpufreq_setup(void) else if (PVR_VER(mfspr(SPRN_PVR)) == 0x7000) pmac_cpufreq_init_750FX(cpunode); out: of_node_put(cpunode); if (set_speed_proc == NULL) return -ENODEV; Loading arch/powerpc/platforms/powermac/setup.c +3 −2 Original line number Diff line number Diff line Loading @@ -250,9 +250,9 @@ static void __init l2cr_init(void) { /* Checks "l2cr-value" property in the registry */ if (cpu_has_feature(CPU_FTR_L2CR)) { struct device_node *np = find_devices("cpus"); struct device_node *np = of_find_node_by_name(NULL, "cpus"); if (np == 0) np = find_type_devices("cpu"); np = of_find_node_by_type(NULL, "cpu"); if (np != 0) { const unsigned int *l2cr = of_get_property(np, "l2cr-value", NULL); Loading @@ -262,6 +262,7 @@ static void __init l2cr_init(void) _set_L2CR(0); _set_L2CR(ppc_override_l2cr_value); } of_node_put(np); } } Loading drivers/macintosh/via-pmu.c +4 −1 Original line number Diff line number Diff line Loading @@ -319,10 +319,13 @@ int __init find_via_pmu(void) else if (device_is_compatible(vias->parent, "Keylargo") || device_is_compatible(vias->parent, "K2-Keylargo")) { struct device_node *gpiop; struct device_node *adbp; u64 gaddr = OF_BAD_ADDR; pmu_kind = PMU_KEYLARGO_BASED; pmu_has_adb = (find_type_devices("adb") != NULL); adbp = of_find_node_by_type(NULL, "adb"); pmu_has_adb = (adbp != NULL); of_node_put(adbp); pmu_intr_mask = PMU_INT_PCEJECT | PMU_INT_SNDBRT | PMU_INT_ADB | Loading Loading
arch/powerpc/kernel/prom.c +0 −19 Original line number Diff line number Diff line Loading @@ -1091,25 +1091,6 @@ struct device_node *find_devices(const char *name) } EXPORT_SYMBOL(find_devices); /** * Construct and return a list of the device_nodes with a given type. */ struct device_node *find_type_devices(const char *type) { struct device_node *head, **prevp, *np; prevp = &head; for (np = allnodes; np != 0; np = np->allnext) { if (np->type != 0 && strcasecmp(np->type, type) == 0) { *prevp = np; prevp = &np->next; } } *prevp = NULL; return head; } EXPORT_SYMBOL(find_type_devices); /** Checks if the given "compat" string matches one of the strings in * the device's "compatible" property */ Loading
arch/powerpc/platforms/chrp/setup.c +4 −2 Original line number Diff line number Diff line Loading @@ -226,12 +226,12 @@ static void __init pegasos_set_l2cr(void) return; /* Enable L2 cache if needed */ np = find_type_devices("cpu"); np = of_find_node_by_type(NULL, "cpu"); if (np != NULL) { const unsigned int *l2cr = of_get_property(np, "l2cr", NULL); if (l2cr == NULL) { printk ("Pegasos l2cr : no cpu l2cr property found\n"); return; goto out; } if (!((*l2cr) & 0x80000000)) { printk ("Pegasos l2cr : L2 cache was not active, " Loading @@ -240,6 +240,8 @@ static void __init pegasos_set_l2cr(void) _set_L2CR((*l2cr) | 0x80000000); } } out: of_node_put(np); } static void briq_restart(char *cmd) Loading
arch/powerpc/platforms/powermac/cpufreq_32.c +2 −1 Original line number Diff line number Diff line Loading @@ -658,7 +658,7 @@ static int __init pmac_cpufreq_setup(void) return 0; /* Assume only one CPU */ cpunode = find_type_devices("cpu"); cpunode = of_find_node_by_type(NULL, "cpu"); if (!cpunode) goto out; Loading Loading @@ -708,6 +708,7 @@ static int __init pmac_cpufreq_setup(void) else if (PVR_VER(mfspr(SPRN_PVR)) == 0x7000) pmac_cpufreq_init_750FX(cpunode); out: of_node_put(cpunode); if (set_speed_proc == NULL) return -ENODEV; Loading
arch/powerpc/platforms/powermac/setup.c +3 −2 Original line number Diff line number Diff line Loading @@ -250,9 +250,9 @@ static void __init l2cr_init(void) { /* Checks "l2cr-value" property in the registry */ if (cpu_has_feature(CPU_FTR_L2CR)) { struct device_node *np = find_devices("cpus"); struct device_node *np = of_find_node_by_name(NULL, "cpus"); if (np == 0) np = find_type_devices("cpu"); np = of_find_node_by_type(NULL, "cpu"); if (np != 0) { const unsigned int *l2cr = of_get_property(np, "l2cr-value", NULL); Loading @@ -262,6 +262,7 @@ static void __init l2cr_init(void) _set_L2CR(0); _set_L2CR(ppc_override_l2cr_value); } of_node_put(np); } } Loading
drivers/macintosh/via-pmu.c +4 −1 Original line number Diff line number Diff line Loading @@ -319,10 +319,13 @@ int __init find_via_pmu(void) else if (device_is_compatible(vias->parent, "Keylargo") || device_is_compatible(vias->parent, "K2-Keylargo")) { struct device_node *gpiop; struct device_node *adbp; u64 gaddr = OF_BAD_ADDR; pmu_kind = PMU_KEYLARGO_BASED; pmu_has_adb = (find_type_devices("adb") != NULL); adbp = of_find_node_by_type(NULL, "adb"); pmu_has_adb = (adbp != NULL); of_node_put(adbp); pmu_intr_mask = PMU_INT_PCEJECT | PMU_INT_SNDBRT | PMU_INT_ADB | Loading