From patchwork Wed May 20 14:34:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 24997 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 n4KEcEIj008353 for ; Wed, 20 May 2009 14:38:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753713AbZETOhl (ORCPT ); Wed, 20 May 2009 10:37:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754142AbZETOhl (ORCPT ); Wed, 20 May 2009 10:37:41 -0400 Received: from rv-out-0506.google.com ([209.85.198.224]:61455 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753713AbZETOhk (ORCPT ); Wed, 20 May 2009 10:37:40 -0400 Received: by rv-out-0506.google.com with SMTP id f9so157310rvb.1 for ; Wed, 20 May 2009 07:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=3tnJr1wn3t98tOK/m/2707zNMmPodltDQ243onydzTw=; b=MC5nN+bjgmRf4QldWLaHpoIl4Zq8K4BiadQY4kbMywme8tU419663NHE32+PE2pKkl P4xxFx2A/o6uPG4pRc5LTyj/UZ0IPWYk7pE757fGRPnxRoEIJPxr/kbcLqf3dNDUJe1j Wk/u9ibhDxH2uNYHTaP8dzqzhNzri7NB8+Jqk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=sy7rQAAl1hsLUngn/zMGASXLVmS2WKP4uMbcprQBXKzYgyagDcY/R8pf0a2/x0Nnuo jFeRFdaJ7b+2yCcVwuLOHhXl7zYvL/EUejztFgXi+btrNiC9cqb9iS5oLgDlsJIlMlUh KlVHKZEIRTEWDPsXK3Q5P0cFWyCMIZjQAYSCk= Received: by 10.140.171.18 with SMTP id t18mr577609rve.10.1242830261957; Wed, 20 May 2009 07:37:41 -0700 (PDT) Received: from rx1.opensource.se (210.5.32.202.bf.2iij.net [202.32.5.210]) by mx.google.com with ESMTPS id g22sm3640145rvb.56.2009.05.20.07.37.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 20 May 2009 07:37:40 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Wed, 20 May 2009 23:34:43 +0900 Message-Id: <20090520143443.8362.79529.sendpatchset@rx1.opensource.se> Subject: [PATCH] video: stop sh_mobile_lcdcfb only if started Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm This patch fixes the LCDC driver to avoid calling the function sh_mobile_lcdc_start_stop(priv, 0) unless the same function has been called before to start the LCDC hardware. Triggered when sh_mobile_lcdcfb.c failed to probe() due to missing MSTP clocks. Signed-off-by: Magnus Damm --- drivers/video/sh_mobile_lcdcfb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/drivers/video/sh_mobile_lcdcfb.c +++ work/drivers/video/sh_mobile_lcdcfb.c 2009-05-20 22:26:40.000000000 +0900 @@ -47,6 +47,7 @@ struct sh_mobile_lcdc_priv { #endif unsigned long lddckr; struct sh_mobile_lcdc_chan ch[2]; + int started; }; /* shared registers */ @@ -451,6 +452,7 @@ static int sh_mobile_lcdc_start(struct s /* start the lcdc */ sh_mobile_lcdc_start_stop(priv, 1); + priv->started = 1; /* tell the board code to enable the panel */ for (k = 0; k < ARRAY_SIZE(priv->ch); k++) { @@ -493,7 +495,10 @@ static void sh_mobile_lcdc_stop(struct s } /* stop the lcdc */ - sh_mobile_lcdc_start_stop(priv, 0); + if (priv->started) { + sh_mobile_lcdc_start_stop(priv, 0); + priv->started = 0; + } /* stop clocks */ for (k = 0; k < ARRAY_SIZE(priv->ch); k++)