[PATCH 3/5] regulator: Fix ena_gpio check

From: Markus Pargmann
Date: Mon Oct 06 2014 - 16:18:38 EST


Use the introduced ena_gpio_valid field to check if ena_gpio stores a
valid gpio.

Signed-off-by: Markus Pargmann <mpa@xxxxxxxxxxxxxx>
---
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 a3c3785901f5..fd683d26786c 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3560,7 +3560,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 (config->ena_gpio_valid && 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/