summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/video/fbdev/mxsfb.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/video/fbdev/mxsfb.c b/drivers/video/fbdev/mxsfb.c
index 71ea8df544f1..927a85577a55 100644
--- a/drivers/video/fbdev/mxsfb.c
+++ b/drivers/video/fbdev/mxsfb.c
@@ -1343,7 +1343,6 @@ static int mxsfb_init_fbinfo_dt(struct mxsfb_info *host)
struct device *dev = &host->pdev->dev;
struct device_node *np = host->pdev->dev.of_node;
struct device_node *display_np;
- struct device_node *timings_np;
struct display_timings *timings = NULL;
const char *disp_dev, *disp_videomode;
struct videomode vm;
@@ -1414,23 +1413,16 @@ static int mxsfb_init_fbinfo_dt(struct mxsfb_info *host)
goto put_display_node;
}
- timings_np = of_find_node_by_name(display_np,
- "display-timings");
- if (!timings_np) {
- dev_err(dev, "failed to find display-timings node\n");
- ret = -ENOENT;
- goto put_display_node;
- }
-
INIT_LIST_HEAD(&fb_info->modelist);
- for (i = 0; i < of_get_child_count(timings_np); i++) {
+ for (i = 0; i < timings->num_timings; i++) {
ret = videomode_from_timings(timings, &vm, i);
if (ret < 0)
- goto put_timings_node;
+ goto put_display_node;
+
ret = fb_videomode_from_videomode(&vm, &fb_vm);
if (ret < 0)
- goto put_timings_node;
+ goto put_display_node;
if (!(vm.flags & DISPLAY_FLAGS_DE_HIGH))
fb_vm.sync |= FB_SYNC_OE_LOW_ACT;
@@ -1461,8 +1453,6 @@ static int mxsfb_init_fbinfo_dt(struct mxsfb_info *host)
/* save the sync value getting from dtb */
host->sync = fb_info->var.sync;
-put_timings_node:
- of_node_put(timings_np);
put_display_node:
if (timings)
kfree(timings);