From: Mark Brown <broonie@linaro.org>
Date: Thu, 5 Dec 2013 19:09:55 +0000 (+0000)
Subject: regulator: gpio: Warn if an invalid regulator-type is supplied
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9eb9d3150bd941be2f2e370e0081736d9d51e31b;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

regulator: gpio: Warn if an invalid regulator-type is supplied

Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
---

diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
index cdb9d947d914..49fe20f58d2a 100644
--- a/drivers/regulator/gpio-regulator.c
+++ b/drivers/regulator/gpio-regulator.c
@@ -210,6 +210,9 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np)
 			config->type = REGULATOR_VOLTAGE;
 		else if (!strncmp("current", regtype, 7))
 			config->type = REGULATOR_CURRENT;
+		else
+			dev_warn(dev, "Unknown regulator-type '%s'\n",
+				 regtype);
 	}
 
 	return config;