summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-11-16 07:55:28 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-12-26 16:02:42 +0400
commit899a179dbf5878fd01c0bd3b0e884ec526916afb (patch)
tree959d87f6156096f0f79ede9e5127fbedd8d9f16f /drivers/media
parent341068fcf8cc10145d38abe927fa9b9f0c461c66 (diff)
downloadlinux-899a179dbf5878fd01c0bd3b0e884ec526916afb.tar.xz
[media] s5p-tv: Use devm_gpio_request in sii9234_drv.c
devm_gpio_request is a device managed function and will make error handling and cleanup a bit simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/s5p-tv/sii9234_drv.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/media/platform/s5p-tv/sii9234_drv.c b/drivers/media/platform/s5p-tv/sii9234_drv.c
index 716d4846f8bd..4597342cdfbe 100644
--- a/drivers/media/platform/s5p-tv/sii9234_drv.c
+++ b/drivers/media/platform/s5p-tv/sii9234_drv.c
@@ -338,7 +338,7 @@ static int __devinit sii9234_probe(struct i2c_client *client,
}
ctx->gpio_n_reset = pdata->gpio_n_reset;
- ret = gpio_request(ctx->gpio_n_reset, "MHL_RST");
+ ret = devm_gpio_request(dev, ctx->gpio_n_reset, "MHL_RST");
if (ret) {
dev_err(dev, "failed to acquire MHL_RST gpio\n");
return ret;
@@ -370,7 +370,6 @@ fail_pm_get:
fail_pm:
pm_runtime_disable(dev);
- gpio_free(ctx->gpio_n_reset);
fail:
dev_err(dev, "probe failed\n");
@@ -381,11 +380,8 @@ fail:
static int __devexit sii9234_remove(struct i2c_client *client)
{
struct device *dev = &client->dev;
- struct v4l2_subdev *sd = i2c_get_clientdata(client);
- struct sii9234_context *ctx = sd_to_context(sd);
pm_runtime_disable(dev);
- gpio_free(ctx->gpio_n_reset);
dev_info(dev, "remove successful\n");