public inbox for linux-fbdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] fbdev: nvidia: use for_each_child_of_node() macro
@ 2020-09-16  6:21 Qinglang Miao
  2020-10-16 21:44 ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Qinglang Miao @ 2020-09-16  6:21 UTC (permalink / raw)
  To: Antonino Daplas, Bartlomiej Zolnierkiewicz
  Cc: linux-fbdev, Qinglang Miao, linux-kernel, dri-devel

Use for_each_child_of_node() macro instead of open coding it.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 drivers/video/fbdev/nvidia/nv_of.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/nvidia/nv_of.c b/drivers/video/fbdev/nvidia/nv_of.c
index 5f3e5179c..d20b8779b 100644
--- a/drivers/video/fbdev/nvidia/nv_of.c
+++ b/drivers/video/fbdev/nvidia/nv_of.c
@@ -42,8 +42,7 @@ int nvidia_probe_of_connector(struct fb_info *info, int conn, u8 **out_edid)
 		const char *pname;
 		int len;
 
-		for (dp = NULL;
-		     (dp = of_get_next_child(parent, dp)) != NULL;) {
+		for_each_child_of_node(parent, dp) {
 			pname = of_get_property(dp, "name", NULL);
 			if (!pname)
 				continue;
-- 
2.23.0

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

end of thread, other threads:[~2020-10-16 21:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-16  6:21 [PATCH -next] fbdev: nvidia: use for_each_child_of_node() macro Qinglang Miao
2020-10-16 21:44 ` Sam Ravnborg
2020-10-16 21:44   ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox