summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2017-02-08 16:43:59 +0100
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2017-02-08 16:43:59 +0100
commit8d22556873cbe36f30a0d018b9d8238425117515 (patch)
treed1709db2a0775ac9fc36d4b36b19a80776913bac /drivers/video
parentcd7b917c98d6775fd1cb1eac84f5f1ea97b16e79 (diff)
downloadlinux-8d22556873cbe36f30a0d018b9d8238425117515.tar.gz
linux-8d22556873cbe36f30a0d018b9d8238425117515.tar.bz2
linux-8d22556873cbe36f30a0d018b9d8238425117515.zip
video: fbdev: offb: switch to using for_each_node_by_type
Instead of open-coding loops let's switch to a nice macro. Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Yongji Xie <xyjxie@linux.vnet.ibm.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/offb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
index 906c6e75c260..9be884b0c778 100644
--- a/drivers/video/fbdev/offb.c
+++ b/drivers/video/fbdev/offb.c
@@ -668,14 +668,14 @@ static int __init offb_init(void)
offb_init_nodriver(of_chosen, 1);
}
- for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) {
+ for_each_node_by_type(dp, "display") {
if (of_get_property(dp, "linux,opened", NULL) &&
of_get_property(dp, "linux,boot-display", NULL)) {
boot_disp = dp;
offb_init_nodriver(dp, 0);
}
}
- for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) {
+ for_each_node_by_type(dp, "display") {
if (of_get_property(dp, "linux,opened", NULL) &&
dp != boot_disp)
offb_init_nodriver(dp, 0);