aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/imxfb.c
diff options
context:
space:
mode:
authorGwenhael Goavec-Merou <gwe@trabucayre.com>2013-01-13 10:56:43 -0500
committerShawn Guo <shawn.guo@linaro.org>2013-01-13 19:16:18 -0500
commitafc10301f70350b490ca518ceb793928854b5453 (patch)
treec6430549ad63a1bce13d49127e9d768ebca9adba /drivers/video/imxfb.c
parent006e792ba5f60c59d8bc5ac5628c54e021e8580f (diff)
video: imxfb: fix imxfb_info configuration order
The devtype field for fbi (struct imxfb_info) must be set after memset call to avoid some wrong behaviour (pixel size). Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@armadeus.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'drivers/video/imxfb.c')
-rw-r--r--drivers/video/imxfb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index e501dbc966b3..8435c5d601a1 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -729,6 +729,8 @@ static int __init imxfb_init_fbinfo(struct platform_device *pdev)
729 729
730 memset(fbi, 0, sizeof(struct imxfb_info)); 730 memset(fbi, 0, sizeof(struct imxfb_info));
731 731
732 fbi->devtype = pdev->id_entry->driver_data;
733
732 strlcpy(info->fix.id, IMX_NAME, sizeof(info->fix.id)); 734 strlcpy(info->fix.id, IMX_NAME, sizeof(info->fix.id));
733 735
734 info->fix.type = FB_TYPE_PACKED_PIXELS; 736 info->fix.type = FB_TYPE_PACKED_PIXELS;
@@ -789,7 +791,6 @@ static int __init imxfb_probe(struct platform_device *pdev)
789 return -ENOMEM; 791 return -ENOMEM;
790 792
791 fbi = info->par; 793 fbi = info->par;
792 fbi->devtype = pdev->id_entry->driver_data;
793 794
794 if (!fb_mode) 795 if (!fb_mode)
795 fb_mode = pdata->mode[0].mode.name; 796 fb_mode = pdata->mode[0].mode.name;