From patchwork Fri May 31 14:28:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Genoud X-Patchwork-Id: 2644221 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 58E4EDFB79 for ; Fri, 31 May 2013 14:29:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754471Ab3EaO3A (ORCPT ); Fri, 31 May 2013 10:29:00 -0400 Received: from mail-wg0-f51.google.com ([74.125.82.51]:34021 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753699Ab3EaO25 (ORCPT ); Fri, 31 May 2013 10:28:57 -0400 Received: by mail-wg0-f51.google.com with SMTP id b13so1293228wgh.30 for ; Fri, 31 May 2013 07:28:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=pJFqI2/R0FaKO4PV817eP84giUbPKbdRQQmA4CyWxXA=; b=J9QtHa0BIFxnD8tom25DrK81JxVlZVgQsjxu3r8BK6m5NorEPjDM24cArlF9bs9BUz AHONKneZbC8MUrXiYujLWGUmKqjUUNfurYMRl26HbULhWVHlFwELprw3OyxrnOOYnaYV NQfC9N+fwZBpla9Nl0B74nfdRK5bUhAqc/O24yW++Kkjw3GBY/TQdZMNJMXhD+qtQgDf qgtvX1GNNEsOTCudeav88HEmSQhwXRYbmQp02gd6sWZmCcF7JiDM/dhVDTHMNzdSkTi5 RArtpmWY/VQqlFJ0gBoR19YSA/FZqWpU2ZfXyWFvwiJW3pFc2KpAtRx9EEY36IrTva0C pQdA== X-Received: by 10.180.21.167 with SMTP id w7mr3634797wie.2.1370010536454; Fri, 31 May 2013 07:28:56 -0700 (PDT) Received: from lnx-rg.pr (lyon.paratronic.fr. [213.41.177.106]) by mx.google.com with ESMTPSA id fp16sm4336079wic.6.2013.05.31.07.28.54 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 May 2013 07:28:55 -0700 (PDT) From: Richard Genoud To: Nicolas Ferre Cc: Jean-Christophe Plagniol-Villard , Tomi Valkeinen , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Genoud Subject: [PATCH 2/2] atmel_lcdfb: blank the backlight on remove Date: Fri, 31 May 2013 16:28:39 +0200 Message-Id: <1370010519-18691-2-git-send-email-richard.genoud@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1370010519-18691-1-git-send-email-richard.genoud@gmail.com> References: <1370010519-18691-1-git-send-email-richard.genoud@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org When removing atmel_lcdfb module, the backlight is unregistered but not blanked. (only for CONFIG_BACKLIGHT_ATMEL_LCDC case). This can result in the screen going full white depending on how the PWM is wired. Signed-off-by: Richard Genoud --- drivers/video/atmel_lcdfb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 6e6491f..e00318f 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c @@ -223,8 +223,13 @@ static void init_backlight(struct atmel_lcdfb_info *sinfo) static void exit_backlight(struct atmel_lcdfb_info *sinfo) { - if (sinfo->backlight) + if (sinfo->backlight) { + if (sinfo->backlight->ops) { + sinfo->backlight->props.power = FB_BLANK_POWERDOWN; + sinfo->backlight->ops->update_status(sinfo->backlight); + } backlight_device_unregister(sinfo->backlight); + } } #else