mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 00:21:59 +00:00
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: Sean Cross <xobs@kosagi.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
a6dcf9782f
commit
fe788b0955
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user