diff mbox

ARM: imx: imxfb: fix imxfb_info configuration order

Message ID 1358092603-13480-2-git-send-email-gwenhael.goavec-merou@armadeus.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gwenhael Goavec-Merou Jan. 13, 2013, 3:56 p.m. UTC
From: Gwenhael Goavec-Merou <gwe@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@armadeus.com>
---
 drivers/video/imxfb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Shawn Guo Jan. 14, 2013, 12:37 a.m. UTC | #1
On Sun, Jan 13, 2013 at 04:56:43PM +0100, Gwenhael Goavec-Merou wrote:
> From: Gwenhael Goavec-Merou <gwe@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@armadeus.com>

Gwenhael,

Thanks for fixing the problems left from patch e69dc9a (video: imxfb:
remove cpu_is_xxx by using platform_device_id).

Considering the absence of FB maintainer, I will send both patches
through arm-soc tree for -rc.  But since it's still a FB patch,
I changed the patch prefix to "video: imxfb: ...".

Shawn
diff mbox

Patch

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;