From: CMY Date: Fri, 28 Nov 2014 06:49:59 +0000 (+0800) Subject: rk: ion: fix dts parse failure on arm64 X-Git-Tag: firefly_0821_release~4158^2~567 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e46863d23c4753b4f523dcdde0a907c06df40494;p=firefly-linux-kernel-4.4.55.git rk: ion: fix dts parse failure on arm64 --- diff --git a/drivers/staging/android/ion/rockchip/rockchip_ion.c b/drivers/staging/android/ion/rockchip/rockchip_ion.c index ee9ca75aebda..31394da72882 100755 --- a/drivers/staging/android/ion/rockchip/rockchip_ion.c +++ b/drivers/staging/android/ion/rockchip/rockchip_ion.c @@ -270,7 +270,7 @@ int __init rockchip_ion_find_heap(unsigned long node, const char *uname, return 0; prop = of_get_flat_dt_prop(node, "rockchip,ion_heap", &len); - if (!prop || (len != sizeof(unsigned long))) + if (!prop || (len != sizeof(__be32))) return 0; heap = &pdata->heaps[pdata->nr++]; @@ -279,10 +279,10 @@ int __init rockchip_ion_find_heap(unsigned long node, const char *uname, rockchip_ion_populate_heap(heap); prop = of_get_flat_dt_prop(node, "reg", &len); - if (prop && (len >= 2*sizeof(unsigned long))) { + if (prop && (len >= 2*sizeof(__be32))) { heap->base = be32_to_cpu(prop[0]); heap->size = be32_to_cpu(prop[1]); - if (len==3*sizeof(unsigned long)) + if (len==3*sizeof(__be32)) heap->align = be32_to_cpu(prop[2]); }