diff options
author | Jeremy Kerr <jeremy.kerr@canonical.com> | 2010-02-01 23:34:14 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-02-09 10:34:10 -0500 |
commit | 36b9d3070d653af5807cef74ff129721d9047107 (patch) | |
tree | 92bdd46742a4a49d37a517b8061391a6a6f6ed42 /drivers/of | |
parent | 1406bc2f57787797d1f6a3675c019a7093769275 (diff) |
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 <jeremy.kerr@canonical.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/fdt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 9290ca5aa892..56fbd6e3122a 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
@@ -420,11 +420,11 @@ int __init early_init_dt_scan_root(unsigned long node, const char *uname, | |||
420 | return 0; | 420 | return 0; |
421 | 421 | ||
422 | prop = of_get_flat_dt_prop(node, "#size-cells", NULL); | 422 | prop = of_get_flat_dt_prop(node, "#size-cells", NULL); |
423 | dt_root_size_cells = (prop == NULL) ? 1 : *prop; | 423 | dt_root_size_cells = prop ? *prop : OF_ROOT_NODE_SIZE_CELLS_DEFAULT; |
424 | pr_debug("dt_root_size_cells = %x\n", dt_root_size_cells); | 424 | pr_debug("dt_root_size_cells = %x\n", dt_root_size_cells); |
425 | 425 | ||
426 | prop = of_get_flat_dt_prop(node, "#address-cells", NULL); | 426 | prop = of_get_flat_dt_prop(node, "#address-cells", NULL); |
427 | dt_root_addr_cells = (prop == NULL) ? 2 : *prop; | 427 | dt_root_addr_cells = prop ? *prop : OF_ROOT_NODE_ADDR_CELLS_DEFAULT; |
428 | pr_debug("dt_root_addr_cells = %x\n", dt_root_addr_cells); | 428 | pr_debug("dt_root_addr_cells = %x\n", dt_root_addr_cells); |
429 | 429 | ||
430 | /* break now */ | 430 | /* break now */ |