diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-01-07 10:01:53 +0530 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-01-10 12:41:37 +0200 |
commit | 924d2532ab1897b034fa5477aea661732b91d748 (patch) | |
tree | f589fb6231be63f5a9332857336f7e9ab9be2513 /drivers/usb/gadget/s3c-hsudc.c | |
parent | d2aec37c3b7aa029ffb4ac5fa3d1ee3453d4d0a4 (diff) | |
download | op-kernel-dev-924d2532ab1897b034fa5477aea661732b91d748.zip op-kernel-dev-924d2532ab1897b034fa5477aea661732b91d748.tar.gz |
usb: gadget: s3c-hsudc: Use devm_regulator_bulk_get
devm_regulator_bulk_get is device managed and makes exit code
simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/s3c-hsudc.c')
-rw-r--r-- | drivers/usb/gadget/s3c-hsudc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c index 52379b1..d2b8791 100644 --- a/drivers/usb/gadget/s3c-hsudc.c +++ b/drivers/usb/gadget/s3c-hsudc.c @@ -1286,7 +1286,7 @@ static int s3c_hsudc_probe(struct platform_device *pdev) for (i = 0; i < ARRAY_SIZE(hsudc->supplies); i++) hsudc->supplies[i].supply = s3c_hsudc_supply_names[i]; - ret = regulator_bulk_get(dev, ARRAY_SIZE(hsudc->supplies), + ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(hsudc->supplies), hsudc->supplies); if (ret != 0) { dev_err(dev, "failed to request supplies: %d\n", ret); @@ -1367,7 +1367,6 @@ err_res: if (!IS_ERR_OR_NULL(hsudc->transceiver)) usb_put_phy(hsudc->transceiver); - regulator_bulk_free(ARRAY_SIZE(hsudc->supplies), hsudc->supplies); err_supplies: return ret; } |