Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753802AbaFEEWn (ORCPT ); Thu, 5 Jun 2014 00:22:43 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44591 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753767AbaFEEWj (ORCPT ); Thu, 5 Jun 2014 00:22:39 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold , Jingoo Han , Andrew Morton , Linus Torvalds , Ben Hutchings , Qiang Huang Subject: [PATCH 3.4 208/214] backlight: atmel-pwm-bl: fix gpio polarity in remove Date: Wed, 4 Jun 2014 21:19:31 -0700 Message-Id: <20140605041707.420465138@linuxfoundation.org> X-Mailer: git-send-email 2.0.0 In-Reply-To: <20140605041639.638675216@linuxfoundation.org> References: <20140605041639.638675216@linuxfoundation.org> User-Agent: quilt/0.60-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johan Hovold commit ad5066d4c2b1d696749f8d7816357c23b648c4d3 upstream. Make sure to honour gpio polarity also at remove so that the backlight is actually disabled on boards with active-low enable pin. Signed-off-by: Johan Hovold Acked-by: Jingoo Han Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings Cc: Qiang Huang Signed-off-by: Greg Kroah-Hartman --- drivers/video/backlight/atmel-pwm-bl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/video/backlight/atmel-pwm-bl.c +++ b/drivers/video/backlight/atmel-pwm-bl.c @@ -211,7 +211,8 @@ static int __exit atmel_pwm_bl_remove(st struct atmel_pwm_bl *pwmbl = platform_get_drvdata(pdev); if (pwmbl->gpio_on != -1) { - gpio_set_value(pwmbl->gpio_on, 0); + gpio_set_value(pwmbl->gpio_on, + 0 ^ pwmbl->pdata->on_active_low); gpio_free(pwmbl->gpio_on); } pwm_channel_disable(&pwmbl->pwmc); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/