diff mbox

[-next] dmaengine: qcom_hidma: use for_each_matching_node() macro

Message ID 1468414506-3332-1-git-send-email-weiyj_lk@163.com (mailing list archive)
State Accepted
Headers show

Commit Message

weiyj_lk@163.com July 13, 2016, 12:55 p.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Use for_each_matching_node() macro instead of open coding it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/dma/qcom/hidma_mgmt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)





--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Sinan Kaya July 16, 2016, 1:58 a.m. UTC | #1
On 7/13/2016 8:55 AM, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Use for_each_matching_node() macro instead of open coding it.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  drivers/dma/qcom/hidma_mgmt.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 

Acked-by: Sinan Kaya <okaya@codeaurora.org>
Vinod Koul July 24, 2016, 6:16 a.m. UTC | #2
On Wed, Jul 13, 2016 at 12:55:06PM +0000, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Use for_each_matching_node() macro instead of open coding it.

Applied, thanks
diff mbox

Patch

diff --git a/drivers/dma/qcom/hidma_mgmt.c b/drivers/dma/qcom/hidma_mgmt.c
index 6416ded..82f36e4 100644
--- a/drivers/dma/qcom/hidma_mgmt.c
+++ b/drivers/dma/qcom/hidma_mgmt.c
@@ -392,8 +392,7 @@  static int __init hidma_mgmt_init(void)
 #if defined(CONFIG_OF) && defined(CONFIG_OF_IRQ)
 	struct device_node *child;
 
-	for (child = of_find_matching_node(NULL, hidma_mgmt_match); child;
-	     child = of_find_matching_node(child, hidma_mgmt_match)) {
+	for_each_matching_node(child, hidma_mgmt_match) {
 		/* device tree based firmware here */
 		hidma_mgmt_of_populate_channels(child);
 		of_node_put(child);