public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: linux-kernel@vger.kernel.org, sameo@linux.intel.com
Subject: Re: [PATCH 1/1] mfd: 88pm860x: Use devm_regmap_init_i2c()
Date: Wed, 12 Jun 2013 10:27:34 +0100	[thread overview]
Message-ID: <20130612092734.GC4320@laptop> (raw)
In-Reply-To: <1371025543-4485-1-git-send-email-sachin.kamat@linaro.org>

On Wed, 12 Jun 2013, Sachin Kamat wrote:

> devm_regmap_init_i2c() is device managed and makes cleanup simpler.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/mfd/88pm860x-core.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c
> index ef6d82c..eeb481d 100644
> --- a/drivers/mfd/88pm860x-core.c
> +++ b/drivers/mfd/88pm860x-core.c
> @@ -1156,7 +1156,7 @@ static int pm860x_probe(struct i2c_client *client,
>  		return -ENOMEM;
>  
>  	chip->id = verify_addr(client);
> -	chip->regmap = regmap_init_i2c(client, &pm860x_regmap_config);
> +	chip->regmap = devm_regmap_init_i2c(client, &pm860x_regmap_config);
>  	if (IS_ERR(chip->regmap)) {
>  		ret = PTR_ERR(chip->regmap);
>  		dev_err(&client->dev, "Failed to allocate register map: %d\n",
> @@ -1203,7 +1203,6 @@ static int pm860x_remove(struct i2c_client *client)
>  		regmap_exit(chip->regmap_companion);
>  		i2c_unregister_device(chip->companion);
>  	}
> -	regmap_exit(chip->regmap);
>  	return 0;
>  }

Applied, thanks.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

      reply	other threads:[~2013-06-12  9:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12  8:25 [PATCH 1/1] mfd: 88pm860x: Use devm_regmap_init_i2c() Sachin Kamat
2013-06-12  9:27 ` Lee Jones [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=20130612092734.GC4320@laptop \
    --to=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sachin.kamat@linaro.org \
    --cc=sameo@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox