Messages in this thread Patch in this message | | | Date | Fri, 10 Aug 2012 11:02:43 +0530 | Subject | | From | "devendra.aaru" <> |
| |
Hi,
In function tegra_pinctrl_dt_node_to_map the num_maps the num_maps counter must be incremented for each child node?
Actually we are doing free until num_maps if tegra_pinctrl_dt_subnode_to_map,
not only that if num_maps == 0, we wont free up the maps, and also i think the for_each_of_node checks whether we have a next child node, so its safe to do num_maps++ as it wont get incremented endlessly,
Please correct me if i am wrong.
Thanks,
diff --git a/drivers/pinctrl/pinctrl-tegra.c b/drivers/pinctrl/pinctrl-tegra.c index ae52e4e..33ae918 100644 --- a/drivers/pinctrl/pinctrl-tegra.c +++ b/drivers/pinctrl/pinctrl-tegra.c @@ -303,6 +303,7 @@ int tegra_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev, *num_maps = 0;
for_each_child_of_node(np_config, np) { + num_maps++; ret = tegra_pinctrl_dt_subnode_to_map(pctldev->dev, np, map, &reserved_maps, num_maps); if (ret < 0) {
| |