From patchwork Tue Aug 10 22:04:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laine Walker-Avina X-Patchwork-Id: 118623 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7AM5pdT005820 for ; Tue, 10 Aug 2010 22:05:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933501Ab0HJWEL (ORCPT ); Tue, 10 Aug 2010 18:04:11 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:64816 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933486Ab0HJWEI convert rfc822-to-8bit (ORCPT ); Tue, 10 Aug 2010 18:04:08 -0400 Received: by wwj40 with SMTP id 40so13460923wwj.1 for ; Tue, 10 Aug 2010 15:04:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=bJ26iGyz/DMxEooWrvn9XOFO2SIYiq9E3ReQxKUGfk0=; b=D5zghlwN29odgZ+h5C6u1bE/o9BMy3RMpkxrIhOHq/WWdABXufLzvtpllwBNjXKGMo wIFSDx6y1t7mqavDGlIQTyk5y/IqGE/sBCsB3+j+pu3BGsk/w1EmVQyz9MOy2D8nG60p NAK8NVEqx+oQez8KNrxP3MhnI2LrjltncbHYc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=qc/unVs+M3GLXDxOTAYe3h3dwB3+teZQ1gXi429fg7xCQi39aZQxrTAfpwt//goR8c fWKd4zE32qe7f+XV/0cVBUDoTQB8YWHy9pPypV+fmK73K6H+MOhJDeC6aJ/6k1T4Nv9a hhWs64WNGjFCnDeLVi9aQLExjWWAWF13vfmEQ= MIME-Version: 1.0 Received: by 10.216.46.147 with SMTP id r19mr4414725web.86.1281477846543; Tue, 10 Aug 2010 15:04:06 -0700 (PDT) Received: by 10.216.131.2 with HTTP; Tue, 10 Aug 2010 15:04:06 -0700 (PDT) In-Reply-To: <1281442585-6511-1-git-send-email-stanley.miao@windriver.com> References: <1281442585-6511-1-git-send-email-stanley.miao@windriver.com> Date: Tue, 10 Aug 2010 15:04:06 -0700 X-Google-Sender-Auth: BSbuEVMmN56w8-oX-owlMhV3hAE Message-ID: Subject: Re: [PATCH] OMAP: DSS2: don't power off a panel twice From: Laine Walker-Avina To: "Stanley.Miao" Cc: tomi.valkeinen@nokia.com, linux-omap@vger.kernel.org Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 10 Aug 2010 22:06:07 +0000 (UTC) diff --git a/drivers/video/omap2/displays/panel-generic.c b/drivers/video/omap2/displays/panel-generic.c index 300eff5..abc03f4 100644 --- a/drivers/video/omap2/displays/panel-generic.c +++ b/drivers/video/omap2/displays/panel-generic.c @@ -91,9 +91,12 @@ static int generic_panel_enable(struct omap_dss_device *dssdev) static void generic_panel_disable(struct omap_dss_device *dssdev) { - generic_panel_power_off(dssdev); + if(dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) + { + generic_panel_power_off(dssdev); - dssdev->state = OMAP_DSS_DISPLAY_DISABLED; + dssdev->state = OMAP_DSS_DISPLAY_DISABLED; + } }