diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-07-05 15:06:57 (GMT) |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-15 20:49:53 (GMT) |
commit | 8fa25eda86b1a149fd19b5ce80d8cf7b6c8fb566 (patch) | |
tree | 6d55a3d26f23d85ca2a4da11d66a2f86db77b53b /arch/m68k/apollo/config.c | |
parent | 8a8e3d5915b3b40a64a5e7dc5aeb208594917a15 (diff) | |
download | linux-fsl-qoriq-8fa25eda86b1a149fd19b5ce80d8cf7b6c8fb566.tar.xz |
regulator: max8997: 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 with -EBUSY, we should
return error rather than ommit the gpio_request failure with -EBUSY.
I think one of the reason we got -EBUSY is because current code does not free
gpios in max8997_pmic_remove(). So it got -EBUSY when reload the module.
Yest another reason is in current code if gpio_request() returns -EBUSY,
the rest of the code still calls gpio_direction_output to config buck125_gpios
and set gpio value in max8997_set_gpio(). 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 'arch/m68k/apollo/config.c')
0 files changed, 0 insertions, 0 deletions