public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAPFB: Check in suspend/resume if framebuffer device is initialized.
@ 2008-03-26 11:58 Jouni Högander
  2008-03-28 10:40 ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Jouni Högander @ 2008-03-26 11:58 UTC (permalink / raw)
  To: linux-omap

Check wether fbdev is NULL in suspend / resume functions. Fbdev is
NULL, if there is no lcd or it is not enabled in configuration.
---
 drivers/video/omap/omapfb_main.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index f66b81a..139c84c 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;
 }
 
-- 
1.5.3.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-03-28 13:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-26 11:58 [PATCH] OMAPFB: Check in suspend/resume if framebuffer device is initialized Jouni Högander
2008-03-28 10:40 ` Tony Lindgren
2008-03-28 13:03   ` Jouni Högander
2008-03-28 13:45     ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox