Skip to contentSkip to conversation

video: deferred io cleanup fix for sh_mobile_lcdcfb

PATCH In review Magnus Damm 2 participants 2 messages Mar 10, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: deferred io cleanup fix for sh_mobile_lcdcfb

From: Magnus Damm <[email protected]>

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.

---

 drivers/video/sh_mobile_lcdcfb.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/video/sh_mobile_lcdcfb.c +2 -4
@@ -446,7 +446,6 @@ static void sh_mobile_lcdc_stop(struct s
 {
 	struct sh_mobile_lcdc_chan *ch;
 	struct sh_mobile_lcdc_board_cfg	*board_cfg;
-	unsigned long tmp;
 	int k;
 
 	/* tell the board code to disable the panel */
@@ -456,9 +455,8 @@ static void sh_mobile_lcdc_stop(struct s
 		if (board_cfg->display_off)
 			board_cfg->display_off(board_cfg->board_data);
 
-		/* cleanup deferred io if SYS bus */
-		tmp = ch->cfg.sys_bus_cfg.deferred_io_msec;
-		if (ch->ldmt1r_value & (1 << 12) && tmp) {
+		/* cleanup deferred io if enabled */
+		if (ch->info.fbdefio) {
 			fb_deferred_io_cleanup(&ch->info);
 			ch->info.fbdefio = NULL;
 		}
#1 lore raw
Quoted 9 lines · Magnus Damm

From: Magnus Damm <[email protected]>

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.

Quoted 5 lines

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.

Rolled in to the for-2.6.29 queue, thanks.