summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap
diff options
context:
space:
mode:
authorJouni Hogander <jouni.hogander@nokia.com>2009-09-23 01:46:58 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 16:39:50 +0200
commitb6c2b66d353dba229ce167acef49639b9ddf90d9 (patch)
tree713588f83eb02bec22dfce4f6a9b9930f83ed9ce /drivers/video/omap
parentomapfb: dispc: allow multiple external IRQ handlers (diff)
downloadlinux-b6c2b66d353dba229ce167acef49639b9ddf90d9.tar.xz
linux-b6c2b66d353dba229ce167acef49639b9ddf90d9.zip
omapfb: suspend/resume only if FB device is already 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 Hogander <jouni.hogander@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Imre Deak <imre.deak@nokia.com> Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/omap')
-rw-r--r--drivers/video/omap/omapfb_main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index db05f7e316e7..7eab0f0b4ccf 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -1846,8 +1846,8 @@ static int omapfb_suspend(struct platform_device *pdev, pm_message_t mesg)
{
struct omapfb_device *fbdev = platform_get_drvdata(pdev);
- omapfb_blank(FB_BLANK_POWERDOWN, fbdev->fb_info[0]);
-
+ if (fbdev != NULL)
+ omapfb_blank(FB_BLANK_POWERDOWN, fbdev->fb_info[0]);
return 0;
}
@@ -1856,7 +1856,8 @@ static int omapfb_resume(struct platform_device *pdev)
{
struct omapfb_device *fbdev = platform_get_drvdata(pdev);
- omapfb_blank(FB_BLANK_UNBLANK, fbdev->fb_info[0]);
+ if (fbdev != NULL)
+ omapfb_blank(FB_BLANK_UNBLANK, fbdev->fb_info[0]);
return 0;
}