of: reserved_mem: fix cell count for memory-region property
Sri Krishna chowdary [Fri, 28 Aug 2015 05:37:15 +0000 (10:37 +0530)]
cell count represents the number of cells following a phandle
that are relevant to the phandle. There are 0 such cells for
memory-region property, it contains phandles entirely

Bug 200133729

Change-Id: Iba39de7cd31ed48314689dae7219b5cbb55f6c58
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/790825
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

drivers/of/of_reserved_mem.c

index 03b834f..2275432 100644 (file)
@@ -250,7 +250,7 @@ int of_reserved_mem_device_init(struct device *dev)
        int err = -ENODEV;
 
        of_property_for_each_phandle_with_args(iter, dev->of_node, "memory-region",
-                                              NULL, 1) {
+                                              NULL, 0) {
                struct of_phandle_args *ret = &iter.out_args;
 
                if (!ret->np)