ARM: tegra: clock: Correct wrong pointer passing
Jinyoung Park [Mon, 9 Sep 2013 09:13:22 +0000 (18:13 +0900)]
Corrected a wrong device node pointer passing.

Bug 1352073

Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/271984
(cherry picked from commit b4c1cbb7af55a8a67e32bc788138c731b5e1d239)

Change-Id: Ib4354e0b74d1babf671d141cea238e9a55299343
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/301041
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>

arch/arm/mach-tegra/tegra11_emc.c
arch/arm/mach-tegra/tegra3_emc.c

index 2b345d6..8fa1574 100644 (file)
@@ -1137,7 +1137,7 @@ static struct device_node *tegra_emc_ramcode_devnode(struct device_node *np)
        u32 reg;
 
        for_each_child_of_node(np, iter) {
-               if (of_property_read_u32(np, "nvidia,ram-code", &reg))
+               if (of_property_read_u32(iter, "nvidia,ram-code", &reg))
                        continue;
                if (reg == tegra_bct_strapping)
                        return of_node_get(iter);
index f29ef90..4a62a83 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * arch/arm/mach-tegra/tegra3_emc.c
  *
- * Copyright (C) 2011-2012, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2011-2013, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -1055,7 +1055,7 @@ static struct device_node *tegra_emc_ramcode_devnode(struct device_node *np)
        u32 reg;
 
        for_each_child_of_node(np, iter) {
-               if (of_property_read_u32(np, "nvidia,ram-code", &reg))
+               if (of_property_read_u32(iter, "nvidia,ram-code", &reg))
                        continue;
                if (reg == tegra_bct_strapping)
                        return of_node_get(iter);