Skip to content

Commit

Permalink
regulator: gpio: Warn if an invalid regulator-type is supplied
Browse files Browse the repository at this point in the history
Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Mark Brown committed Dec 6, 2013
1 parent 5b1ada8 commit 9eb9d31
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/regulator/gpio-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9eb9d31

Please sign in to comment.