Loading arch/powerpc/kernel/lparcfg.c +4 −2 Original line number Diff line number Diff line Loading @@ -321,7 +321,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) struct device_node *rtas_node; const int *lrdrp = NULL; rtas_node = find_path_device("/rtas"); rtas_node = of_find_node_by_path("/rtas"); if (rtas_node) lrdrp = of_get_property(rtas_node, "ibm,lrdr-capacity", NULL); Loading @@ -330,6 +330,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) } else { partition_potential_processors = *(lrdrp + 4); } of_node_put(rtas_node); partition_active_processors = lparcfg_count_active_processors(); Loading Loading @@ -537,7 +538,7 @@ static int lparcfg_data(struct seq_file *m, void *v) seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS); rootdn = find_path_device("/"); rootdn = of_find_node_by_path("/"); if (rootdn) { tmp = of_get_property(rootdn, "model", NULL); if (tmp) { Loading @@ -557,6 +558,7 @@ static int lparcfg_data(struct seq_file *m, void *v) NULL); if (lp_index_ptr) lp_index = *lp_index_ptr; of_node_put(rootdn); } seq_printf(m, "serial_number=%s\n", system_id); seq_printf(m, "system_type=%s\n", model); Loading arch/powerpc/kernel/pci_32.c +12 −5 Original line number Diff line number Diff line Loading @@ -669,6 +669,7 @@ pcibios_make_OF_bus_map(void) int i; struct pci_controller* hose; struct property *map_prop; struct device_node *dn; pci_to_OF_bus_map = kmalloc(pci_bus_count, GFP_KERNEL); if (!pci_to_OF_bus_map) { Loading @@ -690,12 +691,13 @@ pcibios_make_OF_bus_map(void) continue; make_one_node_map(node, hose->first_busno); } map_prop = of_find_property(find_path_device("/"), "pci-OF-bus-map", NULL); dn = of_find_node_by_path("/"); map_prop = of_find_property(dn, "pci-OF-bus-map", NULL); if (map_prop) { BUG_ON(pci_bus_count > map_prop->length); memcpy(map_prop->value, pci_to_OF_bus_map, pci_bus_count); } of_node_put(dn); #ifdef DEBUG printk("PCI->OF bus map:\n"); for (i=0; i<pci_bus_count; i++) { Loading Loading @@ -1006,14 +1008,19 @@ void __init pci_create_OF_bus_map(void) { struct property* of_prop; struct device_node *dn; of_prop = (struct property*) alloc_bootmem(sizeof(struct property) + 256); if (of_prop && find_path_device("/")) { if (!of_prop) return; dn = of_find_node_by_path("/"); if (dn) { memset(of_prop, -1, sizeof(struct property) + 256); of_prop->name = "pci-OF-bus-map"; of_prop->length = 256; of_prop->value = &of_prop[1]; prom_add_property(find_path_device("/"), of_prop); prom_add_property(dn, of_prop); of_node_put(dn); } } Loading arch/powerpc/kernel/prom.c +0 −14 Original line number Diff line number Diff line Loading @@ -1153,20 +1153,6 @@ int machine_is_compatible(const char *compat) } EXPORT_SYMBOL(machine_is_compatible); /** * Find the device_node with a given full_name. */ struct device_node *find_path_device(const char *path) { struct device_node *np; for (np = allnodes; np != 0; np = np->allnext) if (np->full_name != 0 && strcasecmp(np->full_name, path) == 0) return np; return NULL; } EXPORT_SYMBOL(find_path_device); /******* * * New implementation of the OF "find" APIs, return a refcounted Loading arch/powerpc/kernel/rtas.c +2 −1 Original line number Diff line number Diff line Loading @@ -192,7 +192,7 @@ void rtas_progress(char *s, unsigned short hex) if (display_width == 0) { display_width = 0x10; if ((root = find_path_device("/rtas"))) { if ((root = of_find_node_by_path("/rtas"))) { if ((p = of_get_property(root, "ibm,display-line-length", NULL))) display_width = *p; Loading @@ -204,6 +204,7 @@ void rtas_progress(char *s, unsigned short hex) display_lines = *p; row_width = of_get_property(root, "ibm,display-truncation-length", NULL); of_node_put(root); } display_character = rtas_token("display-character"); set_indicator = rtas_token("set-indicator"); Loading arch/powerpc/kernel/sysfs.c +2 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ static int __init smt_setup(void) if (!cpu_has_feature(CPU_FTR_SMT)) return -ENODEV; options = find_path_device("/options"); options = of_find_node_by_path("/options"); if (!options) return -ENODEV; Loading @@ -76,6 +76,7 @@ static int __init smt_setup(void) per_cpu(smt_snooze_delay, cpu) = *val; } of_node_put(options); return 0; } __initcall(smt_setup); Loading Loading
arch/powerpc/kernel/lparcfg.c +4 −2 Original line number Diff line number Diff line Loading @@ -321,7 +321,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) struct device_node *rtas_node; const int *lrdrp = NULL; rtas_node = find_path_device("/rtas"); rtas_node = of_find_node_by_path("/rtas"); if (rtas_node) lrdrp = of_get_property(rtas_node, "ibm,lrdr-capacity", NULL); Loading @@ -330,6 +330,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) } else { partition_potential_processors = *(lrdrp + 4); } of_node_put(rtas_node); partition_active_processors = lparcfg_count_active_processors(); Loading Loading @@ -537,7 +538,7 @@ static int lparcfg_data(struct seq_file *m, void *v) seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS); rootdn = find_path_device("/"); rootdn = of_find_node_by_path("/"); if (rootdn) { tmp = of_get_property(rootdn, "model", NULL); if (tmp) { Loading @@ -557,6 +558,7 @@ static int lparcfg_data(struct seq_file *m, void *v) NULL); if (lp_index_ptr) lp_index = *lp_index_ptr; of_node_put(rootdn); } seq_printf(m, "serial_number=%s\n", system_id); seq_printf(m, "system_type=%s\n", model); Loading
arch/powerpc/kernel/pci_32.c +12 −5 Original line number Diff line number Diff line Loading @@ -669,6 +669,7 @@ pcibios_make_OF_bus_map(void) int i; struct pci_controller* hose; struct property *map_prop; struct device_node *dn; pci_to_OF_bus_map = kmalloc(pci_bus_count, GFP_KERNEL); if (!pci_to_OF_bus_map) { Loading @@ -690,12 +691,13 @@ pcibios_make_OF_bus_map(void) continue; make_one_node_map(node, hose->first_busno); } map_prop = of_find_property(find_path_device("/"), "pci-OF-bus-map", NULL); dn = of_find_node_by_path("/"); map_prop = of_find_property(dn, "pci-OF-bus-map", NULL); if (map_prop) { BUG_ON(pci_bus_count > map_prop->length); memcpy(map_prop->value, pci_to_OF_bus_map, pci_bus_count); } of_node_put(dn); #ifdef DEBUG printk("PCI->OF bus map:\n"); for (i=0; i<pci_bus_count; i++) { Loading Loading @@ -1006,14 +1008,19 @@ void __init pci_create_OF_bus_map(void) { struct property* of_prop; struct device_node *dn; of_prop = (struct property*) alloc_bootmem(sizeof(struct property) + 256); if (of_prop && find_path_device("/")) { if (!of_prop) return; dn = of_find_node_by_path("/"); if (dn) { memset(of_prop, -1, sizeof(struct property) + 256); of_prop->name = "pci-OF-bus-map"; of_prop->length = 256; of_prop->value = &of_prop[1]; prom_add_property(find_path_device("/"), of_prop); prom_add_property(dn, of_prop); of_node_put(dn); } } Loading
arch/powerpc/kernel/prom.c +0 −14 Original line number Diff line number Diff line Loading @@ -1153,20 +1153,6 @@ int machine_is_compatible(const char *compat) } EXPORT_SYMBOL(machine_is_compatible); /** * Find the device_node with a given full_name. */ struct device_node *find_path_device(const char *path) { struct device_node *np; for (np = allnodes; np != 0; np = np->allnext) if (np->full_name != 0 && strcasecmp(np->full_name, path) == 0) return np; return NULL; } EXPORT_SYMBOL(find_path_device); /******* * * New implementation of the OF "find" APIs, return a refcounted Loading
arch/powerpc/kernel/rtas.c +2 −1 Original line number Diff line number Diff line Loading @@ -192,7 +192,7 @@ void rtas_progress(char *s, unsigned short hex) if (display_width == 0) { display_width = 0x10; if ((root = find_path_device("/rtas"))) { if ((root = of_find_node_by_path("/rtas"))) { if ((p = of_get_property(root, "ibm,display-line-length", NULL))) display_width = *p; Loading @@ -204,6 +204,7 @@ void rtas_progress(char *s, unsigned short hex) display_lines = *p; row_width = of_get_property(root, "ibm,display-truncation-length", NULL); of_node_put(root); } display_character = rtas_token("display-character"); set_indicator = rtas_token("set-indicator"); Loading
arch/powerpc/kernel/sysfs.c +2 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ static int __init smt_setup(void) if (!cpu_has_feature(CPU_FTR_SMT)) return -ENODEV; options = find_path_device("/options"); options = of_find_node_by_path("/options"); if (!options) return -ENODEV; Loading @@ -76,6 +76,7 @@ static int __init smt_setup(void) per_cpu(smt_snooze_delay, cpu) = *val; } of_node_put(options); return 0; } __initcall(smt_setup); Loading