From: Ville Syrjälä Date: Tue, 20 Mar 2012 14:46:20 +0000 (+0200) Subject: gfx: drv: Correctly set info->par X-Git-Tag: 2.1b_release~191 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d98d6bf463c3fc5a8c26f29a972cca633a55b6c1;p=kernel%2Fkernel-mfld-blackbay.git gfx: drv: Correctly set info->par When using drm_fb_helper, fbdev par is supposed to point to the drm_fb_helper instance. This "bug" didn't cause problems as the helper is emedded as the first member inside the psb_fbdev strcture. But let's make the code correct nonetheless. Signed-off-by: Ville Syrjälä Signed-off-by: Kirill A. Shutemov --- diff --git a/drivers/staging/mrst/drv/psb_fb.c b/drivers/staging/mrst/drv/psb_fb.c index 789f25b..a7f79df 100644 --- a/drivers/staging/mrst/drv/psb_fb.c +++ b/drivers/staging/mrst/drv/psb_fb.c @@ -68,8 +68,8 @@ static int psbfb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *info) { - struct psb_fbdev * fbdev = info->par; - struct drm_framebuffer *fb = fbdev->psb_fb_helper.fb; + struct drm_fb_helper *fb_helper = info->par; + struct drm_framebuffer *fb = fb_helper->fb; uint32_t v; if (!fb) @@ -422,7 +422,7 @@ static int psbfb_create(struct psb_fbdev * fbdev, struct drm_fb_helper_surface_s goto out_err1; } - info->par = fbdev; + info->par = &fbdev->psb_fb_helper; psbfb->fbdev = info;