[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1409336356-27682-1-git-send-email-dmitry_eremin@mentor.com>
Date: Fri, 29 Aug 2014 22:19:16 +0400
From: Dmitry Eremin-Solenikov <dmitry_eremin@...tor.com>
To: <linux-kernel@...r.kernel.org>
CC: Mark Brown <broonie@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Dirk Behme <dirk.behme@...bosch.com>,
Gokulkrishnan Nagarajan <Gokulkrishnan.Nagarajan@...bosch.com>
Subject: [PATCH] regulator: core: GPIO #0 is a valid GPIO
From: Dirk Behme <dirk.behme@...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@...bosch.com>
Signed-off-by: Dirk Behme <dirk.behme@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists