summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-09-16 14:21:23 +0800
committerSam Ravnborg <sam@ravnborg.org>2020-10-16 23:43:41 +0200
commit3da1781ea458f658e6089c1cc471016a72fb81cf (patch)
tree37c0c0b5804aeca274ea0724c772ec5bbf3c5732 /drivers/video
parent8bdfc5dae4e3ba4d99dfb430ef43249e5f1b7730 (diff)
fbdev: nvidia: use for_each_child_of_node() macro
Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200916062123.190636-1-miaoqinglang@huawei.com
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/nvidia/nv_of.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/video/fbdev/nvidia/nv_of.c b/drivers/video/fbdev/nvidia/nv_of.c
index 5f3e5179c25a..d20b8779bb32 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;