From: Laxman Dewangan <ldewangan@nvidia.com>
To: <broonie@kernel.org>, <lgirdwood@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, Laxman Dewangan <ldewangan@nvidia.com>
Subject: [PATCH] regulator: fixed: Remove WARs for handling of_get_named_gpio() return
Date: Thu, 10 Mar 2016 17:42:46 +0530 [thread overview]
Message-ID: <1457611967-29365-1-git-send-email-ldewangan@nvidia.com> (raw)
The GPIO interface of_get_named_gpio() has implemented the proper
error returns even EPROBE_DEFER and hence caller need not to
implement any WAR for translating the returned error.
Remove the WAR implemented in fixed regulator to handle the
return of of_get_named_gpio().
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
As per comment, it is said that patch is already posted. If the patch is
active then please add my Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
drivers/regulator/fixed.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index ff62d69..988a747 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -79,18 +79,8 @@ of_get_fixed_voltage_config(struct device *dev,
config->enabled_at_boot = true;
config->gpio = of_get_named_gpio(np, "gpio", 0);
- /*
- * of_get_named_gpio() currently returns ENODEV rather than
- * EPROBE_DEFER. This code attempts to be compatible with both
- * for now; the ENODEV check can be removed once the API is fixed.
- * of_get_named_gpio() doesn't differentiate between a missing
- * property (which would be fine here, since the GPIO is optional)
- * and some other error. Patches have been posted for both issues.
- * Once they are check in, we should replace this with:
- * if (config->gpio < 0 && config->gpio != -ENOENT)
- */
- if ((config->gpio == -ENODEV) || (config->gpio == -EPROBE_DEFER))
- return ERR_PTR(-EPROBE_DEFER);
+ if ((config->gpio < 0) && (config->gpio != -ENOENT))
+ return ERR_PTR(config->gpio);
of_property_read_u32(np, "startup-delay-us", &config->startup_delay);
--
2.1.4
next reply other threads:[~2016-03-10 12:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-10 12:12 Laxman Dewangan [this message]
2016-03-10 12:12 ` [PATCH] regulator: of: Use of_property_read_u32() for reading min/max Laxman Dewangan
2016-03-11 4:30 ` [PATCH] regulator: fixed: Remove WARs for handling of_get_named_gpio() return Mark Brown
2016-03-11 8:14 ` Laxman Dewangan
2016-03-12 5:58 ` Mark Brown
2016-03-13 12:55 ` Laxman Dewangan
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=1457611967-29365-1-git-send-email-ldewangan@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.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®