aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-05-20 10:34:43 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-05-22 00:19:15 -0400
commit8e9bb19ef97d6594e735bee64b6d72103e350854 (patch)
treececfe0966ae47c1af9db67f1704e7b9933de37cf /drivers
parent37869fa2da1a952ed736858f8b9e45c0b9131ae9 (diff)
video: stop sh_mobile_lcdcfb only if started
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 <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 92ea0ab44ce2..f10d2fbeda06 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -47,6 +47,7 @@ struct sh_mobile_lcdc_priv {
47#endif 47#endif
48 unsigned long lddckr; 48 unsigned long lddckr;
49 struct sh_mobile_lcdc_chan ch[2]; 49 struct sh_mobile_lcdc_chan ch[2];
50 int started;
50}; 51};
51 52
52/* shared registers */ 53/* shared registers */
@@ -451,6 +452,7 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
451 452
452 /* start the lcdc */ 453 /* start the lcdc */
453 sh_mobile_lcdc_start_stop(priv, 1); 454 sh_mobile_lcdc_start_stop(priv, 1);
455 priv->started = 1;
454 456
455 /* tell the board code to enable the panel */ 457 /* tell the board code to enable the panel */
456 for (k = 0; k < ARRAY_SIZE(priv->ch); k++) { 458 for (k = 0; k < ARRAY_SIZE(priv->ch); k++) {
@@ -493,7 +495,10 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv)
493 } 495 }
494 496
495 /* stop the lcdc */ 497 /* stop the lcdc */
496 sh_mobile_lcdc_start_stop(priv, 0); 498 if (priv->started) {
499 sh_mobile_lcdc_start_stop(priv, 0);
500 priv->started = 0;
501 }
497 502
498 /* stop clocks */ 503 /* stop clocks */
499 for (k = 0; k < ARRAY_SIZE(priv->ch); k++) 504 for (k = 0; k < ARRAY_SIZE(priv->ch); k++)