aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_lcdcfb.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-03-10 02:08:49 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-03-10 02:23:01 -0400
commit467fc4988986865b5dbcc8cc6a86c9b650cb0c6f (patch)
treeef990fb4c02340c54deb550d506a16097158a31c /drivers/video/sh_mobile_lcdcfb.c
parentba087e6f69381de6c91d6634aa0f603a2fdc96a9 (diff)
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: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 0e2b8fd24df1..2c5d069e5f06 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -446,7 +446,6 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv)
446{ 446{
447 struct sh_mobile_lcdc_chan *ch; 447 struct sh_mobile_lcdc_chan *ch;
448 struct sh_mobile_lcdc_board_cfg *board_cfg; 448 struct sh_mobile_lcdc_board_cfg *board_cfg;
449 unsigned long tmp;
450 int k; 449 int k;
451 450
452 /* tell the board code to disable the panel */ 451 /* 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 if (board_cfg->display_off) 455 if (board_cfg->display_off)
457 board_cfg->display_off(board_cfg->board_data); 456 board_cfg->display_off(board_cfg->board_data);
458 457
459 /* cleanup deferred io if SYS bus */ 458 /* cleanup deferred io if enabled */
460 tmp = ch->cfg.sys_bus_cfg.deferred_io_msec; 459 if (ch->info.fbdefio) {
461 if (ch->ldmt1r_value & (1 << 12) && tmp) {
462 fb_deferred_io_cleanup(&ch->info); 460 fb_deferred_io_cleanup(&ch->info);
463 ch->info.fbdefio = NULL; 461 ch->info.fbdefio = NULL;
464 } 462 }