From cebedf73c49c29f133a7649aa3825c48606a3b42 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Mon, 7 Mar 2016 16:24:20 +0100 Subject: rn5txxx-regulator.c: allow GPIO 0 to be used for an enable signal Follow commit 286098c029bda740822e68ba6ac2ba0b2fe7c5d3 GPIO number 0 *is* legal and must be accepted. Set .ena_gpio to -ENODEV on regulators having no GPIO in preparation of a code change to accept GPIO 0 in the config. Signed-off-by: Max Krummenacher Signed-off-by: Stefan Agner --- drivers/regulator/rn5t567-regulator.c | 2 +- drivers/regulator/rn5t618-regulator.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/rn5t567-regulator.c b/drivers/regulator/rn5t567-regulator.c index 8ac1b010c8b3..bd0313d2fbce 100644 --- a/drivers/regulator/rn5t567-regulator.c +++ b/drivers/regulator/rn5t567-regulator.c @@ -104,7 +104,7 @@ static int rn5t618_regulator_parse_dt(struct platform_device *pdev) static int rn5t618_regulator_probe(struct platform_device *pdev) { struct rn5t618 *rn5t618 = dev_get_drvdata(pdev->dev.parent); - struct regulator_config config = { }; + struct regulator_config config = { .ena_gpio = -ENODEV }; struct regulator_dev *rdev; int ret, i; diff --git a/drivers/regulator/rn5t618-regulator.c b/drivers/regulator/rn5t618-regulator.c index e58d79aeb393..6f395021d950 100644 --- a/drivers/regulator/rn5t618-regulator.c +++ b/drivers/regulator/rn5t618-regulator.c @@ -102,7 +102,7 @@ static int rn5t618_regulator_parse_dt(struct platform_device *pdev) static int rn5t618_regulator_probe(struct platform_device *pdev) { struct rn5t618 *rn5t618 = dev_get_drvdata(pdev->dev.parent); - struct regulator_config config = { }; + struct regulator_config config = { .ena_gpio = -ENODEV }; struct regulator_dev *rdev; int ret, i; -- cgit v1.2.3