[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <f9ed866c0fe8112e1b18f2b90a52e41b23413982.1245842329.git.imre.deak@nokia.com>
Date: Wed, 24 Jun 2009 14:33:42 +0300
From: Imre Deak <imre.deak@...ia.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org,
Krzysztof Helt <krzysztof.h1@...zta.fm>,
Antonino Daplas <adaplas@...il.com>,
Tony Lindgren <tony@...mide.com>,
Tomi Valkeinen <Tomi.Valkeinen@...ia.com>
Subject: [PATCH 17/20] omapfb: suspend/resume only if FB device is already initialized
From: Jouni Högander <jouni.hogander@...ia.com>
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@...ia.com>
Signed-off-by: Tony Lindgren <tony@...mide.com>
Signed-off-by: Imre Deak <imre.deak@...ia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@...pl>
---
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 5b04b9c..098177b 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -1842,8 +1842,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;
}
@@ -1852,7 +1852,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;
}
--
1.6.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists