[PATCH] ARM: imx: imxfb: fix imxfb_info configuration order

Gwenhael Goavec-Merou gwenhael.goavec-merou at armadeus.com
Sun Jan 13 10:56:43 EST 2013


From: Gwenhael Goavec-Merou <gwe at trabucayre.com>

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 at armadeus.com>
---
 drivers/video/imxfb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index e501dbc..8435c5d 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)
 
 	memset(fbi, 0, sizeof(struct imxfb_info));
 
+	fbi->devtype = pdev->id_entry->driver_data;
+
 	strlcpy(info->fix.id, IMX_NAME, sizeof(info->fix.id));
 
 	info->fix.type			= FB_TYPE_PACKED_PIXELS;
@@ -789,7 +791,6 @@ static int __init imxfb_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	fbi = info->par;
-	fbi->devtype = pdev->id_entry->driver_data;
 
 	if (!fb_mode)
 		fb_mode = pdata->mode[0].mode.name;
-- 
1.7.12.4




More information about the linux-arm-kernel mailing list