Commit 467fc498 authored by Magnus Damm's avatar Magnus Damm Committed by Paul Mundt

video: deferred io cleanup fix for sh_mobile_lcdcfb

Fix deferred io cleanup patch in the sh_mobile_lcdcfb driver.

If probe() fails early the sh_mobile_lcdc_stop() function will
be called to clean up deferred io. This patch modifies the
code to only call fb_deferred_io_cleanup() after deferred io
has been initialized.

With this patch applied we no longer hit BUG_ON() inside
fb_deferred_io_cleanup(). Triggers on a Migo-R with the
SYS QVGA panel board unmounted.
Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent ba087e6f
...@@ -446,7 +446,6 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv) ...@@ -446,7 +446,6 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv)
{ {
struct sh_mobile_lcdc_chan *ch; struct sh_mobile_lcdc_chan *ch;
struct sh_mobile_lcdc_board_cfg *board_cfg; struct sh_mobile_lcdc_board_cfg *board_cfg;
unsigned long tmp;
int k; int k;
/* tell the board code to disable the panel */ /* tell the board code to disable the panel */
...@@ -456,9 +455,8 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv) ...@@ -456,9 +455,8 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv)
if (board_cfg->display_off) if (board_cfg->display_off)
board_cfg->display_off(board_cfg->board_data); board_cfg->display_off(board_cfg->board_data);
/* cleanup deferred io if SYS bus */ /* cleanup deferred io if enabled */
tmp = ch->cfg.sys_bus_cfg.deferred_io_msec; if (ch->info.fbdefio) {
if (ch->ldmt1r_value & (1 << 12) && tmp) {
fb_deferred_io_cleanup(&ch->info); fb_deferred_io_cleanup(&ch->info);
ch->info.fbdefio = NULL; ch->info.fbdefio = NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment