From: Lee Jones <lee.jones@linaro.org>
To: Alexandre Courbot <acourbot@nvidia.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
Jingoo Han <jg1.han@samsung.com>, Bryan Wu <cooloney@gmail.com>,
linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
gnurou@gmail.com
Subject: Re: [PATCH] pwm-backlight: use devm_gpiod_get_optional()
Date: Wed, 25 Jun 2014 09:54:47 +0000 [thread overview]
Message-ID: <20140625095447.GT13803@lee--X1> (raw)
In-Reply-To: <1403687898-26881-1-git-send-email-acourbot@nvidia.com>
> Make use of the new devm_gpiod_get_optional() to simplify the probe
> code.
>
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> ---
> drivers/video/backlight/pwm_bl.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
Looks good. Applied, thanks.
> diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
> index 38ca88bc5c3e..d1e0a7c6cac7 100644
> --- a/drivers/video/backlight/pwm_bl.c
> +++ b/drivers/video/backlight/pwm_bl.c
> @@ -245,13 +245,10 @@ static int pwm_backlight_probe(struct platform_device *pdev)
> pb->dev = &pdev->dev;
> pb->enabled = false;
>
> - pb->enable_gpio = devm_gpiod_get(&pdev->dev, "enable");
> + pb->enable_gpio = devm_gpiod_get_optional(&pdev->dev, "enable");
> if (IS_ERR(pb->enable_gpio)) {
> ret = PTR_ERR(pb->enable_gpio);
> - if (ret = -ENOENT)
> - pb->enable_gpio = NULL;
> - else
> - goto err_alloc;
> + goto err_alloc;
> }
>
> /*
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2014-06-25 9:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-25 9:18 [PATCH] pwm-backlight: use devm_gpiod_get_optional() Alexandre Courbot
2014-06-25 9:54 ` Lee Jones [this message]
2014-06-25 11:13 ` Thierry Reding
2014-06-25 12:03 ` Lee Jones
2014-06-27 6:13 ` Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140625095447.GT13803@lee--X1 \
--to=lee.jones@linaro.org \
--cc=acourbot@nvidia.com \
--cc=cooloney@gmail.com \
--cc=gnurou@gmail.com \
--cc=jg1.han@samsung.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).