]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
OMAPFB: Check in suspend/resume if framebuffer device is initialized.
authorJouni Högander <jouni.hogander@nokia.com>
Fri, 28 Mar 2008 13:03:29 +0000 (15:03 +0200)
committerTony Lindgren <tony@atomide.com>
Fri, 28 Mar 2008 13:45:12 +0000 (15:45 +0200)
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 <jouni.hogander@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/video/omap/omapfb_main.c

index f66b81ab984879b582ab1b97556b720585cfdbea..139c84c047e4667164d81478c1cd9ba3b7637d83 100644 (file)
@@ -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;
 }