mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
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>
This commit is contained in:
parent
37869fa2da
commit
8e9bb19ef9
1 changed files with 6 additions and 1 deletions
|
@ -47,6 +47,7 @@ struct sh_mobile_lcdc_priv {
|
||||||
#endif
|
#endif
|
||||||
unsigned long lddckr;
|
unsigned long lddckr;
|
||||||
struct sh_mobile_lcdc_chan ch[2];
|
struct sh_mobile_lcdc_chan ch[2];
|
||||||
|
int started;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* shared registers */
|
/* shared registers */
|
||||||
|
@ -451,6 +452,7 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
|
||||||
|
|
||||||
/* start the lcdc */
|
/* start the lcdc */
|
||||||
sh_mobile_lcdc_start_stop(priv, 1);
|
sh_mobile_lcdc_start_stop(priv, 1);
|
||||||
|
priv->started = 1;
|
||||||
|
|
||||||
/* tell the board code to enable the panel */
|
/* tell the board code to enable the panel */
|
||||||
for (k = 0; k < ARRAY_SIZE(priv->ch); k++) {
|
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)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* stop the lcdc */
|
/* stop the lcdc */
|
||||||
|
if (priv->started) {
|
||||||
sh_mobile_lcdc_start_stop(priv, 0);
|
sh_mobile_lcdc_start_stop(priv, 0);
|
||||||
|
priv->started = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* stop clocks */
|
/* stop clocks */
|
||||||
for (k = 0; k < ARRAY_SIZE(priv->ch); k++)
|
for (k = 0; k < ARRAY_SIZE(priv->ch); k++)
|
||||||
|
|
Loading…
Reference in a new issue