Skip to content
Snippets Groups Projects
Commit 6659f8fe authored by Laura Abbott's avatar Laura Abbott
Browse files

cma: use be32_to_cpup for devicetree conversion


The value returned by of_get_flat_dt_prop is a pointer. Use
be32_to_cpup which properly type checks against pointers.

Change-Id: Ie75ac6776bd26537a28729902bd918e710eda512
Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
parent a6b9ac21
Branches
Tags
No related merge requests found
...@@ -229,11 +229,11 @@ int __init cma_fdt_scan(unsigned long node, const char *uname, ...@@ -229,11 +229,11 @@ int __init cma_fdt_scan(unsigned long node, const char *uname,
prop = of_get_flat_dt_prop(node, "#size-cells", NULL); prop = of_get_flat_dt_prop(node, "#size-cells", NULL);
if (prop) if (prop)
size_cells = be32_to_cpu(prop); size_cells = be32_to_cpup(prop);
prop = of_get_flat_dt_prop(node, "#address-cells", NULL); prop = of_get_flat_dt_prop(node, "#address-cells", NULL);
if (prop) if (prop)
addr_cells = be32_to_cpu(prop); addr_cells = be32_to_cpup(prop);
prop = of_get_flat_dt_prop(node, "reg", &len); prop = of_get_flat_dt_prop(node, "reg", &len);
if (!prop || depth != 2) if (!prop || depth != 2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment