mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[POWERPC] Remove old interface find_devices
Replace uses with of_find_node_by_name and for_each_node_by_name. Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
This commit is contained in:
parent
1658ab6678
commit
30686ba6d5
19 changed files with 206 additions and 134 deletions
|
|
@ -145,11 +145,12 @@ anslcd_init(void)
|
|||
int retval;
|
||||
struct device_node* node;
|
||||
|
||||
node = find_devices("lcd");
|
||||
if (!node || !node->parent)
|
||||
return -ENODEV;
|
||||
if (strcmp(node->parent->name, "gc"))
|
||||
node = of_find_node_by_name(NULL, "lcd");
|
||||
if (!node || !node->parent || strcmp(node->parent->name, "gc")) {
|
||||
of_node_put(node);
|
||||
return -ENODEV;
|
||||
}
|
||||
of_node_put(node);
|
||||
|
||||
anslcd_ptr = ioremap(ANSLCD_ADDR, 0x20);
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue