From: Magnus Damm Date: Sat, 15 Aug 2009 02:53:16 +0000 (+0000) Subject: sh: skip disabled LCDC channels X-Git-Tag: upstream/snapshot3+hdmi~17837^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21bc1f024d0d4ea43fc0f2a43504e759261c7b18;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git sh: skip disabled LCDC channels This patch updates the SuperH Mobile LCDC driver to skip over disabled channels. Without this patch suspend-to-ram operation will crash if deferred io is enabled. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt --- diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 8f24564..07f22b6 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -481,6 +481,9 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv) /* tell the board code to enable the panel */ for (k = 0; k < ARRAY_SIZE(priv->ch); k++) { ch = &priv->ch[k]; + if (!ch->enabled) + continue; + board_cfg = &ch->cfg.board_cfg; if (board_cfg->display_on) board_cfg->display_on(board_cfg->board_data); @@ -498,6 +501,8 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv) /* clean up deferred io and ask board code to disable panel */ for (k = 0; k < ARRAY_SIZE(priv->ch); k++) { ch = &priv->ch[k]; + if (!ch->enabled) + continue; /* deferred io mode: * flush frame, and wait for frame end interrupt