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-conf.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/clk/clk-conf.c b/drivers/clk/clk-conf.c
index 1a4e6340f95c..290dd1230bad 100644
--- a/drivers/clk/clk-conf.c
+++ b/drivers/clk/clk-conf.c
@@ -81,13 +81,11 @@ static int __set_clk_parents(struct device_node *node, bool 
clk_supplier)
 static int __set_clk_rates(struct device_node *node, bool clk_supplier)
 {
        struct of_phandle_args clkspec;
-       struct property *prop;
-       const __be32 *cur;
        int rc, index = 0;
        struct clk *clk;
        u32 rate;
 
-       of_property_for_each_u32(node, "assigned-clock-rates", prop, cur, rate) 
{
+       of_property_for_each_u32_new(node, "assigned-clock-rates", rate) {
                if (rate) {
                        rc = of_parse_phandle_with_args(node, "assigned-clocks",
                                        "#clock-cells", index, &clkspec);

-- 
2.34.1

Reply via email to