summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max8998.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-07-05 17:06:57 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-07-15 22:49:53 +0200
commit8fa25eda86b1a149fd19b5ce80d8cf7b6c8fb566 (patch)
tree6d55a3d26f23d85ca2a4da11d66a2f86db77b53b /drivers/regulator/max8998.c
parentregulator: tps62360: use devm_* for gpio request (diff)
downloadlinux-8fa25eda86b1a149fd19b5ce80d8cf7b6c8fb566.tar.xz
linux-8fa25eda86b1a149fd19b5ce80d8cf7b6c8fb566.zip
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 'drivers/regulator/max8998.c')
0 files changed, 0 insertions, 0 deletions