From 91ad49094bf89d035e286f339e778bf46bfd5e6f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jouni=20H=C3=B6gander?= Date: Fri, 28 Mar 2008 15:03:29 +0200 Subject: [PATCH] OMAPFB: Check in suspend/resume if framebuffer device is initialized. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- drivers/video/omap/omapfb_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; } -- 2.41.3