Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: xilinx: 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>
Link: https://patch.msgid.link/20260301142158.90319-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Vinod Koul
fe8a56f0 3af11dae

+3 -5
+3 -5
drivers/dma/xilinx/xilinx_dma.c
··· 3180 3180 = axivdma_clk_init; 3181 3181 struct device_node *node = pdev->dev.of_node; 3182 3182 struct xilinx_dma_device *xdev; 3183 - struct device_node *child, *np = pdev->dev.of_node; 3183 + struct device_node *np = pdev->dev.of_node; 3184 3184 u32 num_frames, addr_width = XILINX_DMA_DFAULT_ADDRWIDTH, len_width; 3185 3185 int i, err; 3186 3186 ··· 3320 3320 platform_set_drvdata(pdev, xdev); 3321 3321 3322 3322 /* Initialize the channels */ 3323 - for_each_child_of_node(node, child) { 3323 + for_each_child_of_node_scoped(node, child) { 3324 3324 err = xilinx_dma_child_probe(xdev, child); 3325 - if (err < 0) { 3326 - of_node_put(child); 3325 + if (err < 0) 3327 3326 goto error; 3328 - } 3329 3327 } 3330 3328 3331 3329 if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) {