Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1112342imm; Wed, 1 Aug 2018 10:22:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfnrEOCpSWeXMc3ZdtTHTpjLX4vkvbOUktoDi4afPV6F+PwwgeCL/gxRS8Sdk1czInDUOks X-Received: by 2002:a65:5a8a:: with SMTP id c10-v6mr24664866pgt.389.1533144169439; Wed, 01 Aug 2018 10:22:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533144169; cv=none; d=google.com; s=arc-20160816; b=Ix8MzHY5B7q6Qp0dKOM1xXC5a+NBBNkwnDWmtpOJdhOyxooWZdyBhnvli5b4XVZmrO SxftRQFGEhHF7G4NTO36Y/qSYY0jow7BW/rv72upDrDaON6Yk4OwtaDjILXQxpLM2Ea9 4u8DI4xm0xrFBvp6KldWQ2+x01M3FW6mJZ8oV/qddUkR9FrY3BNTkbDzRArJJig6w2Zb cOAggBTH0STbiVP+M5lgDr5RhmDgdEV+PvCJdsAh2PfZHgyGYbraW7tp1Y7Pkagpuprv j4qygALCkrAh+iooHRV56VMBwPuXnaLS7ICrxMdhyvVuOoe2u5/OJqfVwHyKOFQs5jED epHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Zp9y7D32gJ3LbpGRl2Mho5gNJygrllJtB3xDY5zoCZc=; b=ZXvzVrnqpvHhYiqTp098Mh9i22/InCnbUO7DBiuBcf+YjTRrFIhPdl14Rfi3y3vH6x JRnXhPUTfxQgS2deMKRk0tjCagGN5KQLjJf3PzZdZREM/OyOLd3oQpTo9xmA/NGH1Ccv eiyxARdMCIg6DvlFuPWTJTl3fzTrKBIvmmSOSpErWBf/6s7mn8Vimsd1VzK1aGIKVpcE ED5+EiGWdEHQSqOS5grjz9DfTnrrIf05Iu0o9NpOxwZsjjhDlrpNvvKFpLLliwTcS4SI 7Ptals3K3oyNh9CM42/yihfzMRwAv9TYFlMh6T8eWG13GBXUtMmcRe0i7NsyCSfeTJCC Vjgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q9-v6si16104712pfg.27.2018.08.01.10.22.34; Wed, 01 Aug 2018 10:22:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405511AbeHATHc (ORCPT + 99 others); Wed, 1 Aug 2018 15:07:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49216 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404780AbeHATHb (ORCPT ); Wed, 1 Aug 2018 15:07:31 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 69560CC2; Wed, 1 Aug 2018 17:20:50 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wolfram Sang , Daniel Thompson , Simon Horman , Lee Jones , Sasha Levin Subject: [PATCH 4.14 180/246] backlight: pwm_bl: Dont use GPIOF_* with gpiod_get_direction Date: Wed, 1 Aug 2018 18:51:30 +0200 Message-Id: <20180801165020.345834849@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wolfram Sang [ Upstream commit bb084c0f61d659f0e6d371b096e0e57998f191d6 ] The documentation was wrong, gpiod_get_direction() returns 0/1 instead of the GPIOF_* flags. The docs were fixed with commit 94fc73094abe47 ("gpio: correct docs about return value of gpiod_get_direction"). Now, fix this user (until a better, system-wide solution is in place). Signed-off-by: Wolfram Sang Acked-by: Daniel Thompson Reviewed-by: Simon Horman Signed-off-by: Lee Jones Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/video/backlight/pwm_bl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -301,14 +301,14 @@ static int pwm_backlight_probe(struct pl /* * If the GPIO is not known to be already configured as output, that - * is, if gpiod_get_direction returns either GPIOF_DIR_IN or -EINVAL, - * change the direction to output and set the GPIO as active. + * is, if gpiod_get_direction returns either 1 or -EINVAL, change the + * direction to output and set the GPIO as active. * Do not force the GPIO to active when it was already output as it * could cause backlight flickering or we would enable the backlight too * early. Leave the decision of the initial backlight state for later. */ if (pb->enable_gpio && - gpiod_get_direction(pb->enable_gpio) != GPIOF_DIR_OUT) + gpiod_get_direction(pb->enable_gpio) != 0) gpiod_direction_output(pb->enable_gpio, 1); pb->power_supply = devm_regulator_get(&pdev->dev, "power");