Thread (35 messages) read the whole thread 35 messages, 11 authors, 2024-07-08

Re: [PATCH 04/20] clk: sunxi: clk-simple-gates: convert to of_property_for_each_u32_new()

From: Andre Przywara <andre.przywara@arm.com>
Date: 2024-07-03 12:22:03
Also in: linux-arm-msm, linux-clk, linux-devicetree, linux-gpio, linux-iio, linux-omap, linux-pwm, linux-riscv, linux-samsung-soc, linux-serial, linux-sound, linux-sunxi, linux-usb, lkml, llvm

On Wed, 03 Jul 2024 12:36:48 +0200
Luca Ceresoli [off-list ref] wrote:
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.ceresoli@bootlin.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre
quoted hunk ↗ jump to hunk
---
 drivers/clk/sunxi/clk-simple-gates.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/clk/sunxi/clk-simple-gates.c b/drivers/clk/sunxi/clk-simple-gates.c
index 0399627c226a..a30d14937e0b 100644
--- a/drivers/clk/sunxi/clk-simple-gates.c
+++ b/drivers/clk/sunxi/clk-simple-gates.c
@@ -21,11 +21,9 @@ static void __init sunxi_simple_gates_setup(struct device_node *node,
 {
 	struct clk_onecell_data *clk_data;
 	const char *clk_parent, *clk_name;
-	struct property *prop;
 	struct resource res;
 	void __iomem *clk_reg;
 	void __iomem *reg;
-	const __be32 *p;
 	int number, i = 0, j;
 	u8 clk_bit;
 	u32 index;
@@ -47,7 +45,7 @@ static void __init sunxi_simple_gates_setup(struct device_node *node,
 	if (!clk_data->clks)
 		goto err_free_data;
 
-	of_property_for_each_u32(node, "clock-indices", prop, p, index) {
+	of_property_for_each_u32_new(node, "clock-indices", index) {
 		of_property_read_string_index(node, "clock-output-names",
 					      i, &clk_name);
 
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help