Skip to content

Commit

Permalink
regulator: pfuze100: Don't allocate an invalid gpio
Browse files Browse the repository at this point in the history
Previously, the PFUZE100 would try to allocate gpio0 io0 because
config.ena_gpio defaults to 0, which can be a valid GPIO.  To prevent this
from happening, set this parameter to -EINVAL.

Signed-off-by: Sean Cross <xobs@kosagi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Sean Cross authored and Mark Brown committed May 26, 2014
1 parent a6dcf97 commit fe788b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/regulator/pfuze100-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ static int pfuze100_regulator_probe(struct i2c_client *client,
config.init_data = init_data;
config.driver_data = pfuze_chip;
config.of_node = match_of_node(i);
config.ena_gpio = -EINVAL;

pfuze_chip->regulators[i] =
devm_regulator_register(&client->dev, desc, &config);
Expand Down

0 comments on commit fe788b0

Please sign in to comment.