From: Maxime Ripard <maxime.ripard@bootlin.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Chen-Yu Tsai <wens@csie.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gpiolib: Keep returning EPROBE_DEFER when we should
Date: Mon, 26 Feb 2018 14:05:29 +0100 [thread overview]
Message-ID: <20180226130529.ljgnerrz72wyy6mm@flea.lan> (raw)
In-Reply-To: <CACRpkdb1=H-KqZyB50k9gUSUJXtGqeYA8w05Q_P8Jod-2wmWpg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1886 bytes --]
On Mon, Feb 26, 2018 at 11:24:35AM +0100, Linus Walleij wrote:
> On Wed, Feb 21, 2018 at 10:16 AM, Maxime Ripard
> <maxime.ripard@bootlin.com> wrote:
> > On Wed, Feb 21, 2018 at 09:17:15AM +0100, Linus Walleij wrote:
> >> On Wed, Feb 21, 2018 at 9:11 AM, Maxime Ripard
> >> <maxime.ripard@bootlin.com> wrote:
> >>
> > This is slightly embarrassing, but that patch doesn't actually fix
> > anything. I tried to be smart and rework it to look nicer, and
> > obviously failed.
> >
> > Can you squash
> > http://code.bulix.org/z1vkt1-286673
> >
> > in the commit?
>
> This site is down.
Sorry :/
> Can you send a new version of the patch or just reply with the
> change inline here?
Here it is:
---------8<----------------
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index c92847ff5d0a..ae70f679459c 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -241,8 +241,6 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
desc = of_get_named_gpiod_flags(dev->of_node, prop_name, idx,
&of_flags);
- if (!IS_ERR(desc) || (PTR_ERR(desc) != -ENOENT))
- break;
/*
* -EPROBE_DEFER in our case means that we found a
@@ -256,6 +254,9 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
*/
if (IS_ERR(desc) && PTR_ERR(desc) == -EPROBE_DEFER)
return desc;
+
+ if (!IS_ERR(desc) || (PTR_ERR(desc) != -ENOENT))
+ break;
}
/* Special handling for SPI GPIOs if used */
----------8<-----------------
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2018-02-26 13:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 8:11 Maxime Ripard
2018-02-21 8:17 ` Linus Walleij
2018-02-21 8:19 ` Chen-Yu Tsai
2018-02-21 8:35 ` Linus Walleij
2018-02-21 9:16 ` Maxime Ripard
2018-02-26 10:24 ` Linus Walleij
2018-02-26 13:05 ` Maxime Ripard [this message]
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=20180226130529.ljgnerrz72wyy6mm@flea.lan \
--to=maxime.ripard@bootlin.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wens@csie.org \
/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
all inboxes | Powered by JetHome®