lkml.org 
[lkml]   [2010]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[66/74] imxfb: correct location of callbacks in suspend and resume
    2.6.32-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

    commit 1ec562035ba64e724652cb12b8a770b3906e9bf5 upstream.

    The probe function passes a pointer to a struct fb_info to
    platform_set_drvdata(), so don't interpret the return value of
    platform_get_drvdata() as a pointer to struct imxfb_info.

    The original imxfb_info *fbi backlight_power was NULL but in imxfb_suspend
    it was 4 resulting in an oops as imxfb_suspend calls
    imxfb_disable_controller(fbi) which in turn has

    if (fbi->backlight_power)
    fbi->backlight_power(0);

    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Acked-by: Sascha Hauer <kernel@pengutronix.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/video/imxfb.c | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    --- a/drivers/video/imxfb.c
    +++ b/drivers/video/imxfb.c
    @@ -593,7 +593,8 @@ static int imxfb_activate_var(struct fb_
    */
    static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
    {
    - struct imxfb_info *fbi = platform_get_drvdata(dev);
    + struct fb_info *info = platform_get_drvdata(dev);
    + struct imxfb_info *fbi = info->par;

    pr_debug("%s\n", __func__);

    @@ -603,7 +604,8 @@ static int imxfb_suspend(struct platform

    static int imxfb_resume(struct platform_device *dev)
    {
    - struct imxfb_info *fbi = platform_get_drvdata(dev);
    + struct fb_info *info = platform_get_drvdata(dev);
    + struct imxfb_info *fbi = info->par;

    pr_debug("%s\n", __func__);


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2010-02-04 18:29    [W:4.145 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site