regulator: max8660: Use of_get_child_by_name
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 14 Feb 2014 11:49:49 +0000 (17:19 +0530)
committerMark Brown <broonie@linaro.org>
Fri, 14 Feb 2014 21:09:32 +0000 (21:09 +0000)
of_find_node_by_name walks the allnodes list, and can thus walk
outside of the parent node. Use of_get_child_by_name instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/max8660.c

index 8d94d3d7f97f22336fb973d5659ed50b4a3e6a97..70351abbd1e900d203b712eded51401cdaaa55ee 100644 (file)
@@ -330,7 +330,7 @@ static int max8660_pdata_from_dt(struct device *dev,
        struct max8660_subdev_data *sub;
        struct of_regulator_match rmatch[ARRAY_SIZE(max8660_reg)];
 
-       np = of_find_node_by_name(dev->of_node, "regulators");
+       np = of_get_child_by_name(dev->of_node, "regulators");
        if (!np) {
                dev_err(dev, "missing 'regulators' subnode in DT\n");
                return -EINVAL;
This page took 0.024893 seconds and 5 git commands to generate.