From patchwork Tue Mar 10 06:08:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 10809 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2A6BHq5020575 for ; Tue, 10 Mar 2009 06:11:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751624AbZCJGLR (ORCPT ); Tue, 10 Mar 2009 02:11:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752254AbZCJGLR (ORCPT ); Tue, 10 Mar 2009 02:11:17 -0400 Received: from wa-out-1112.google.com ([209.85.146.178]:46520 "EHLO wa-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751624AbZCJGLR (ORCPT ); Tue, 10 Mar 2009 02:11:17 -0400 Received: by wa-out-1112.google.com with SMTP id v33so1191111wah.21 for ; Mon, 09 Mar 2009 23:11:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=B4wJNm6uat6iFEOXl3t6rmVDg8EEXQoduQoXeXEEnyU=; b=FPSfwYvGT1wylrF4chOK7GlF6Ulcaw1xqBQqiBGYVHBHd0oR16a3puEjz/NYxEeukm KAqczXR6KI+QizeI6FJ+8pa7MizLFeki4wy5Ia/JpVqFTdt3dNmq9Pn6itpKyhC4RQ7z hDK5ps9n+V8lPEx6uYXsC6+PNs3Eot6YQ5tJU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=cWB3baYFvg57OeZngmzANxDx2i1gJ4feBGNNEd/nvRgfoLMEPbUWcPswxZ+3mVkwbb AqIi6zBg1DPV9oXnui8u6m4WJpQOBZhGmW9fufFHkwnuBByOZrRxJqyvdGxhXIXxpJUG N51bFVMsQx0/gdu64k/qPK7GHMyWu//RVGIyc= Received: by 10.115.79.8 with SMTP id g8mr4047779wal.65.1236665475090; Mon, 09 Mar 2009 23:11:15 -0700 (PDT) Received: from rx1.opensource.se (210.5.32.202.bf.2iij.net [202.32.5.210]) by mx.google.com with ESMTPS id m26sm12817803pof.4.2009.03.09.23.11.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 09 Mar 2009 23:11:14 -0700 (PDT) From: Magnus Damm To: linux-fbdev-devel@lists.sourceforge.net Cc: Magnus Damm , lethal@linux-sh.org, linux-sh@vger.kernel.org Date: Tue, 10 Mar 2009 15:08:49 +0900 Message-Id: <20090310060849.22278.94445.sendpatchset@rx1.opensource.se> Subject: [PATCH] video: deferred io cleanup fix for sh_mobile_lcdcfb Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm 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 --- drivers/video/sh_mobile_lcdcfb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/drivers/video/sh_mobile_lcdcfb.c +++ work/drivers/video/sh_mobile_lcdcfb.c 2009-03-03 18:31:37.000000000 +0900 @@ -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; }