]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
video: imxfb: fix imxfb_info configuration order
authorGwenhael Goavec-Merou <gwe@trabucayre.com>
Sun, 13 Jan 2013 15:56:43 +0000 (16:56 +0100)
committerShawn Guo <shawn.guo@linaro.org>
Mon, 14 Jan 2013 00:16:18 +0000 (08:16 +0800)
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>
drivers/video/imxfb.c

index e501dbc966b3b2a3976d17956fc9bd9f387cec29..8435c5d601a1c31a1513617a4a721a624971035d 100644 (file)
@@ -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;