From: Sean Cross Date: Mon, 26 May 2014 08:45:41 +0000 (+0800) Subject: regulator: pfuze100: Don't allocate an invalid gpio X-Git-Tag: v5.15~17485^2~1^4~3^4~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe788b09552d1ea318d80d50962d3af69fbb0dbc;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c index b20304b..930eb13 100644 --- a/drivers/regulator/pfuze100-regulator.c +++ b/drivers/regulator/pfuze100-regulator.c @@ -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);