Skip to content

Commit

Permalink
omapfb: suspend/resume only if FB device is already initialized
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jouni Hogander authored and Linus Torvalds committed Sep 23, 2009
1 parent 4c88ef1 commit b6c2b66
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/video/omap/omapfb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down

0 comments on commit b6c2b66

Please sign in to comment.