regulator: gpio: Warn if an invalid regulator-type is supplied
authorMark Brown <broonie@linaro.org>
Thu, 5 Dec 2013 19:09:55 +0000 (19:09 +0000)
committerMark Brown <broonie@linaro.org>
Fri, 6 Dec 2013 12:15:33 +0000 (12:15 +0000)
Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/gpio-regulator.c

index cdb9d947d914078a22ec3050524cd7a94af653d2..49fe20f58d2ab1ed85dd521354921a2e83021de3 100644 (file)
@@ -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;