linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] clk: lmk04832: Simplify with scoped for each OF child loop
@ 2025-12-24 11:22 Krzysztof Kozlowski
  2025-12-24 11:22 ` [PATCH 2/3] clk: scpi: " Krzysztof Kozlowski
  2025-12-24 11:22 ` [PATCH 3/3] clk: versatile: impd1: " Krzysztof Kozlowski
  0 siblings, 2 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2025-12-24 11:22 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Sudeep Holla, Cristian Marussi,
	Linus Walleij, linux-clk, linux-kernel, arm-scmi,
	linux-arm-kernel
  Cc: Krzysztof Kozlowski

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

diff --git a/drivers/clk/clk-lmk04832.c b/drivers/clk/clk-lmk04832.c
index b2107b31efa2..9bf86caad829 100644
--- a/drivers/clk/clk-lmk04832.c
+++ b/drivers/clk/clk-lmk04832.c
@@ -1400,7 +1400,6 @@ static int lmk04832_probe(struct spi_device *spi)
 {
 	const struct lmk04832_device_info *info;
 	int rdbk_pin = RDBK_CLKIN_SEL1;
-	struct device_node *child;
 	struct lmk04832 *lmk;
 	u8 tmp[3];
 	int ret;
@@ -1462,14 +1461,13 @@ static int lmk04832_probe(struct spi_device *spi)
 	device_property_read_u32(lmk->dev, "ti,sysref-pulse-count",
 				 &lmk->sysref_pulse_cnt);
 
-	for_each_child_of_node(lmk->dev->of_node, child) {
+	for_each_child_of_node_scoped(lmk->dev->of_node, child) {
 		int reg;
 
 		ret = of_property_read_u32(child, "reg", &reg);
 		if (ret) {
 			dev_err(lmk->dev, "missing reg property in child: %s\n",
 				child->full_name);
-			of_node_put(child);
 			return ret;
 		}
 
-- 
2.51.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-12-31 21:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-24 11:22 [PATCH 1/3] clk: lmk04832: Simplify with scoped for each OF child loop Krzysztof Kozlowski
2025-12-24 11:22 ` [PATCH 2/3] clk: scpi: " Krzysztof Kozlowski
2025-12-24 18:04   ` Sudeep Holla
2025-12-24 11:22 ` [PATCH 3/3] clk: versatile: impd1: " Krzysztof Kozlowski
2025-12-24 18:05   ` Sudeep Holla
2025-12-31 21:14   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).