Linux Power Management development
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	kernel@pengutronix.de, Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <acourbot@nvidia.com>,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH 2/2] power: reset: ltc2952: use _optional variant of devm_gpiod_get
Date: Sun, 24 May 2015 21:46:45 +0200	[thread overview]
Message-ID: <20150524194645.GH11066@earth> (raw)
In-Reply-To: <1431981907-32578-2-git-send-email-u.kleine-koenig@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

Hi,

On Mon, May 18, 2015 at 10:45:07PM +0200, Uwe Kleine-König wrote:
> devm_gpiod_get_optional returns NULL if devm_gpiod_get would return an
> ENOENT error pointer.
> 
> There is no semantic change intended.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks, queued.

> probably you could argue if the other errors returned by
> devm_gpiod_get_optional should be ignored or not. I'd say it would be cleaner
> to forward the error but as the driver explictly claims it should be ok, I
> kept this behaviour.
> 
> For forwarding the error replace "data->gpio_trigger = NULL" by
> "return PTR_ERR(data->gpio_trigger)".

Looks sensible, but I took the patch as is for now, since I can't
test the changes (I don't have any ltc2952 including devices). Also
it should be a second patch, so that it can be reverted if needed.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-05-24 19:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18 20:45 [PATCH 1/2] power: reset: gpio-poweroff: let devm_gpiod_get set direction of gpio Uwe Kleine-König
2015-05-18 20:45 ` [PATCH 2/2] power: reset: ltc2952: use _optional variant of devm_gpiod_get Uwe Kleine-König
2015-05-24 19:46   ` Sebastian Reichel [this message]
2015-05-19 13:48 ` [PATCH 1/2] power: reset: gpio-poweroff: let devm_gpiod_get set direction of gpio Linus Walleij
2015-05-24 19:44 ` Sebastian Reichel

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=20150524194645.GH11066@earth \
    --to=sre@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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