mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
of/flattree: use OF_ROOT_NODE_{SIZE,ADDR}_CELLS DEFAULT for fdt parsing
At present we're using hard-coded values for defaults when parsing the FDT. This change uses the #defines instead. Signed-off-by: Jeremy Kerr <[email protected]> Signed-off-by: Grant Likely <[email protected]>
This commit is contained in:
parent
1406bc2f57
commit
36b9d3070d
1 changed files with 2 additions and 2 deletions
|
|
@ -420,11 +420,11 @@ int __init early_init_dt_scan_root(unsigned long node, const char *uname,
|
|||
return 0;
|
||||
|
||||
prop = of_get_flat_dt_prop(node, "#size-cells", NULL);
|
||||
dt_root_size_cells = (prop == NULL) ? 1 : *prop;
|
||||
dt_root_size_cells = prop ? *prop : OF_ROOT_NODE_SIZE_CELLS_DEFAULT;
|
||||
pr_debug("dt_root_size_cells = %x\n", dt_root_size_cells);
|
||||
|
||||
prop = of_get_flat_dt_prop(node, "#address-cells", NULL);
|
||||
dt_root_addr_cells = (prop == NULL) ? 2 : *prop;
|
||||
dt_root_addr_cells = prop ? *prop : OF_ROOT_NODE_ADDR_CELLS_DEFAULT;
|
||||
pr_debug("dt_root_addr_cells = %x\n", dt_root_addr_cells);
|
||||
|
||||
/* break now */
|
||||
|
|
|
|||
Loading…
Reference in a new issue