mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 06:04:44 +01:00
clk: versatile: impd1: Simplify with scoped for each OF child loop
Use scoped for-each loop when iterating over device nodes to make code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
9925fda825
commit
faee3e39e6
1 changed files with 2 additions and 5 deletions
|
|
@ -104,15 +104,12 @@ static int integrator_impd1_clk_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device_node *np = dev->of_node;
|
||||
struct device_node *child;
|
||||
int ret = 0;
|
||||
|
||||
for_each_available_child_of_node(np, child) {
|
||||
for_each_available_child_of_node_scoped(np, child) {
|
||||
ret = integrator_impd1_clk_spawn(dev, np, child);
|
||||
if (ret) {
|
||||
of_node_put(child);
|
||||
if (ret)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue