From patchwork Thu Jun 4 17:52:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Imre Deak X-Patchwork-Id: 27970 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n54Htv86000481 for ; Thu, 4 Jun 2009 17:56:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751478AbZFDRz6 (ORCPT ); Thu, 4 Jun 2009 13:55:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751619AbZFDRz6 (ORCPT ); Thu, 4 Jun 2009 13:55:58 -0400 Received: from smtp.nokia.com ([192.100.122.230]:42211 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751478AbZFDRz5 (ORCPT ); Thu, 4 Jun 2009 13:55:57 -0400 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx03.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n54HtMkQ030355; Thu, 4 Jun 2009 20:55:45 +0300 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 4 Jun 2009 20:55:47 +0300 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 4 Jun 2009 20:55:47 +0300 Received: from localhost (esdhcp042124.research.nokia.com [172.21.42.124]) by mgw-da02.ext.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n54HtfEb030233; Thu, 4 Jun 2009 20:55:42 +0300 From: Imre Deak To: Antonino Daplas Cc: linux-fbdev-devel@lists.sourceforge.net, linux-omap@vger.kernel.org, Tony Lindgren , Tomi Valkeinen , =?utf-8?q?Jouni=20H=C3=B6gander?= , Imre Deak Subject: [PATCH 17/20] omapfb: suspend/resume only if FB device is already initialized Date: Thu, 4 Jun 2009 20:52:42 +0300 Message-Id: <20541a2436ab1399a93c28197244bb05e8657859.1244131952.git.imre.deak@nokia.com> X-Mailer: git-send-email 1.6.3.2 In-Reply-To: <024fee28b6c89decf0d50747127db8fc61ac789e.1244131952.git.imre.deak@nokia.com> References: <1244137965-8937-1-git-send-email-imre.deak@nokia.com> <833ed44e61e3d4093eb27b55b97252967e042d41.1244131952.git.imre.deak@nokia.com> <5ba715a9dbc88b8c3a8225bc1cfdabd3faffe00f.1244131952.git.imre.deak@nokia.com> <646692ce09a12e1a8a2d4072097b4d440b7de5d5.1244131952.git.imre.deak@nokia.com> <9139035cc12b22600135677cd5d3096c1dcd286d.1244131952.git.imre.deak@nokia.com> <08ba068bda363adf4cb8a1f5afe11245c828d017.1244131952.git.imre.deak@nokia.com> <057471246e776de4c452b4ba2ebf2a4579f3171c.1244131952.git.imre.deak@nokia.com> <310d4aa52bfd6dd15664286643ca8a9703787dce.1244131952.git.imre.deak@nokia.com> <5dfa68a13340c793f25f12815e5055f9c2eda1a5.1244131952.git.imre.deak@nokia.com> <36ddd74a50b8c225b2c571035c67dbff4686b881.1244131952.git.imre.deak@nokia.com> <024fee28b6c89decf0d50747127db8fc61ac789e.1244131952.git.imre.deak@nokia.com> In-Reply-To: References: MIME-Version: 1.0 X-OriginalArrivalTime: 04 Jun 2009 17:55:47.0601 (UTC) FILETIME=[B0A30810:01C9E53D] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Jouni Högander 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 Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt --- 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; }