From: Jouni Högander Date: Fri, 28 Mar 2008 13:03:29 +0000 (+0200) Subject: OMAPFB: Check in suspend/resume if framebuffer device is initialized. X-Git-Tag: v2.6.25-omap1~89 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=91ad49094bf89d035e286f339e778bf46bfd5e6f;p=linux-2.6-omap-h63xx.git OMAPFB: Check in suspend/resume if framebuffer device is initialized. Check wether fbdev is NULL in suspend / resume functions. Fbdev is NULL, if there is no lcd or it is not enabled in configuration. Signed-off-by: Jouni Högander Signed-off-by: Tony Lindgren --- diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c index f66b81ab984..139c84c047e 100644 --- a/drivers/video/omap/omapfb_main.c +++ b/drivers/video/omap/omapfb_main.c @@ -1839,8 +1839,8 @@ static int omapfb_suspend(struct platform_device *pdev, pm_message_t mesg) { struct omapfb_device *fbdev = platform_get_drvdata(pdev); - omapfb_blank(VESA_POWERDOWN, fbdev->fb_info[0]); - + if (fbdev != NULL) + omapfb_blank(VESA_POWERDOWN, fbdev->fb_info[0]); return 0; } @@ -1849,7 +1849,8 @@ static int omapfb_resume(struct platform_device *pdev) { struct omapfb_device *fbdev = platform_get_drvdata(pdev); - omapfb_blank(VESA_NO_BLANKING, fbdev->fb_info[0]); + if (fbdev != NULL) + omapfb_blank(VESA_NO_BLANKING, fbdev->fb_info[0]); return 0; }