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>

authored by Magnus Damm and committed by Paul Mundt 8e9bb19e 37869fa2

+6 -1
+6 -1
drivers/video/sh_mobile_lcdcfb.c
··· 47 #endif 48 unsigned long lddckr; 49 struct sh_mobile_lcdc_chan ch[2]; 50 }; 51 52 /* shared registers */ ··· 452 453 /* start the lcdc */ 454 sh_mobile_lcdc_start_stop(priv, 1); 455 456 /* tell the board code to enable the panel */ 457 for (k = 0; k < ARRAY_SIZE(priv->ch); k++) { ··· 495 } 496 497 /* stop the lcdc */ 498 - sh_mobile_lcdc_start_stop(priv, 0); 499 500 /* stop clocks */ 501 for (k = 0; k < ARRAY_SIZE(priv->ch); k++)
··· 47 #endif 48 unsigned long lddckr; 49 struct sh_mobile_lcdc_chan ch[2]; 50 + int started; 51 }; 52 53 /* shared registers */ ··· 451 452 /* start the lcdc */ 453 sh_mobile_lcdc_start_stop(priv, 1); 454 + priv->started = 1; 455 456 /* tell the board code to enable the panel */ 457 for (k = 0; k < ARRAY_SIZE(priv->ch); k++) { ··· 493 } 494 495 /* stop the lcdc */ 496 + if (priv->started) { 497 + sh_mobile_lcdc_start_stop(priv, 0); 498 + priv->started = 0; 499 + } 500 501 /* stop clocks */ 502 for (k = 0; k < ARRAY_SIZE(priv->ch); k++)