Skip to content

Commit

Permalink
video: imxfb: fix imxfb_info configuration order
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gwenhael Goavec-Merou authored and Shawn Guo committed Jan 14, 2013
1 parent 006e792 commit afc1030
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/video/imxfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit afc1030

Please sign in to comment.