From: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
To: <linux-kernel@vger.kernel.org>
Cc: Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Dirk Behme <dirk.behme@de.bosch.com>,
Gokulkrishnan Nagarajan <Gokulkrishnan.Nagarajan@in.bosch.com>
Subject: [PATCH] regulator: core: GPIO #0 is a valid GPIO
Date: Fri, 29 Aug 2014 22:19:16 +0400 [thread overview]
Message-ID: <1409336356-27682-1-git-send-email-dmitry_eremin@mentor.com> (raw)
From: Dirk Behme <dirk.behme@de.bosch.com>
With GPIO #0, this if statement will always fail. Remove this, the
check for gpio_is_valid() is sufficent here.
Change-Id: Ia10e8e9c74e11deba852fcd44040cc275b583cfd
Signed-off-by: Gokulkrishnan Nagarajan <Gokulkrishnan.Nagarajan@in.bosch.com>
Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
---
drivers/regulator/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 117f9f8..2f0794f 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3524,7 +3524,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
dev_set_drvdata(&rdev->dev, rdev);
- if (config->ena_gpio && gpio_is_valid(config->ena_gpio)) {
+ if (gpio_is_valid(config->ena_gpio)) {
ret = regulator_ena_gpio_request(rdev, config);
if (ret != 0) {
rdev_err(rdev, "Failed to request enable GPIO%d: %d\n",
--
2.1.0.rc1
next reply other threads:[~2014-08-29 18:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-29 18:19 Dmitry Eremin-Solenikov [this message]
2014-08-29 19:01 ` Mark Brown
2014-09-01 7:46 ` Dirk Behme
2014-09-01 7:55 ` Geert Uytterhoeven
2014-09-01 10:15 ` Mark Brown
2014-09-01 11:59 ` Dmitry Eremin-Solenikov
2014-09-01 12:06 ` Mark Brown
2014-09-01 12:35 ` Dmitry Eremin-Solenikov
2014-09-01 12:49 ` Mark Brown
2014-09-03 9:04 ` Dmitry Eremin-Solenikov
2014-09-03 11:01 ` Mark Brown
2014-09-04 17:15 ` Linus Walleij
2014-09-04 17:19 ` Linus Walleij
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=1409336356-27682-1-git-send-email-dmitry_eremin@mentor.com \
--to=dmitry_eremin@mentor.com \
--cc=Gokulkrishnan.Nagarajan@in.bosch.com \
--cc=broonie@kernel.org \
--cc=dirk.behme@de.bosch.com \
--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®