diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2016-03-13 18:46:57 +0530 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-05-30 16:29:34 +0100 |
commit | f5a6d3516362f85d6a07e930bc10cd4b59f306c7 (patch) | |
tree | 7c9d79b686aedd9a8e1836bfd9e81cc2efcf7a8f /drivers/regulator | |
parent | 1a695a905c18548062509178b98bc91e67510864 (diff) | |
download | linux-stable-f5a6d3516362f85d6a07e930bc10cd4b59f306c7.tar.gz linux-stable-f5a6d3516362f85d6a07e930bc10cd4b59f306c7.tar.bz2 linux-stable-f5a6d3516362f85d6a07e930bc10cd4b59f306c7.zip |
regulator: fixed: Remove workaround to handle of_get_named_gpio() return
The GPIO interface of_get_named_gpio() has implemented the proper
error returns even EPROBE_DEFER and hence caller need not to
implement any workaround for translating the returned error.
Remove the workaround implemented to handle the return of
of_get_named_gpio().
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/fixed.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index ff62d69ba0be..988a7472c2ab 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -79,18 +79,8 @@ of_get_fixed_voltage_config(struct device *dev, config->enabled_at_boot = true; config->gpio = of_get_named_gpio(np, "gpio", 0); - /* - * of_get_named_gpio() currently returns ENODEV rather than - * EPROBE_DEFER. This code attempts to be compatible with both - * for now; the ENODEV check can be removed once the API is fixed. - * of_get_named_gpio() doesn't differentiate between a missing - * property (which would be fine here, since the GPIO is optional) - * and some other error. Patches have been posted for both issues. - * Once they are check in, we should replace this with: - * if (config->gpio < 0 && config->gpio != -ENOENT) - */ - if ((config->gpio == -ENODEV) || (config->gpio == -EPROBE_DEFER)) - return ERR_PTR(-EPROBE_DEFER); + if ((config->gpio < 0) && (config->gpio != -ENOENT)) + return ERR_PTR(config->gpio); of_property_read_u32(np, "startup-delay-us", &config->startup_delay); |