All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Stanislawski <t.stanislaws@samsung.com>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: linux-media@vger.kernel.org, patches@linaro.org,
	sylvester.nawrocki@gmail.com, s.nawrocki@samsung.com
Subject: Re: [PATCH 1/1] [media] s5p-tv: Use devm_gpio_request in sii9234_drv.c
Date: Fri, 16 Nov 2012 07:55:12 +0100	[thread overview]
Message-ID: <50A5E350.6010209@samsung.com> (raw)
In-Reply-To: <1353041728-11032-1-git-send-email-sachin.kamat@linaro.org>

On 11/16/2012 05:55 AM, Sachin Kamat wrote:
> 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>

> ---
>  drivers/media/platform/s5p-tv/sii9234_drv.c |    6 +-----
>  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 716d484..4597342 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");
>  
> 


      reply	other threads:[~2012-11-16  6:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16  4:55 [PATCH 1/1] [media] s5p-tv: Use devm_gpio_request in sii9234_drv.c Sachin Kamat
2012-11-16  6:55 ` Tomasz Stanislawski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50A5E350.6010209@samsung.com \
    --to=t.stanislaws@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sachin.kamat@linaro.org \
    --cc=sylvester.nawrocki@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.