Commit fe788b09 authored by Sean Cross's avatar Sean Cross Committed by Mark Brown

regulator: pfuze100: Don't allocate an invalid gpio

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: default avatarSean Cross <xobs@kosagi.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent a6dcf978
...@@ -506,6 +506,7 @@ static int pfuze100_regulator_probe(struct i2c_client *client, ...@@ -506,6 +506,7 @@ static int pfuze100_regulator_probe(struct i2c_client *client,
config.init_data = init_data; config.init_data = init_data;
config.driver_data = pfuze_chip; config.driver_data = pfuze_chip;
config.of_node = match_of_node(i); config.of_node = match_of_node(i);
config.ena_gpio = -EINVAL;
pfuze_chip->regulators[i] = pfuze_chip->regulators[i] =
devm_regulator_register(&client->dev, desc, &config); devm_regulator_register(&client->dev, desc, &config);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment