Simplify code using of_property_for_each_u32_new() as the two additional
parameters in of_property_for_each_u32() are not used here.

Signed-off-by: Luca Ceresoli <luca.ceres...@bootlin.com>
---
 drivers/clk/clk.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 8cca52be993f..8ea168c00997 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -5504,14 +5504,12 @@ static int parent_ready(struct device_node *np)
 int of_clk_detect_critical(struct device_node *np, int index,
                           unsigned long *flags)
 {
-       struct property *prop;
-       const __be32 *cur;
        uint32_t idx;
 
        if (!np || !flags)
                return -EINVAL;
 
-       of_property_for_each_u32(np, "clock-critical", prop, cur, idx)
+       of_property_for_each_u32_new(np, "clock-critical", idx)
                if (index == idx)
                        *flags |= CLK_IS_CRITICAL;
 

-- 
2.34.1

Reply via email to