diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-07-05 17:12:49 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-15 22:49:53 +0200 |
commit | 5febb3c9d52c65686a8e473a31f15137852f4b5e (patch) | |
tree | 6d291f4989841b875bab4c6004dd7bd32c3870f4 /drivers/regulator/twl-regulator.c | |
parent | regulator: max8997: Properly handle gpio_request failure (diff) | |
download | linux-5febb3c9d52c65686a8e473a31f15137852f4b5e.tar.xz linux-5febb3c9d52c65686a8e473a31f15137852f4b5e.zip |
regulator: s5m8767: Properly handle gpio_request failure
Convert to devm_gpio_request to save a few error handling code.
This patch properly handle the gpio_request failure, we should return error
when gpio_request fails rather than just show warning.
I think one of the reason we got -EBUSY is because current code does not free
gpios in s5m8767_pmic_remove(). So it got -EBUSY when reload the module.
Yest another reason is in current code if gpio_request() returns error,
the rest of the code still calls gpio_direction_output to config buck_gpios
and buck_ds gpios. This looks wrong to me.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/twl-regulator.c')
0 files changed, 0 insertions, 0 deletions