public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: gshark <gshark.jeong@gmail.com>
To: Axel Lin <axel.lin@ingics.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lrg@ti.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regulator: lp8755: Fix lp8755_regulator_init unwind code
Date: Wed, 26 Dec 2012 10:16:59 +0900	[thread overview]
Message-ID: <50DA500B.5090305@gmail.com> (raw)
In-Reply-To: <1356401180.14680.6.camel@phoenix>

2012년 12월 25일 11:06, Axel Lin 쓴 글:
> This patch also includes below cleanups:
> Show correct regulator id in dev_err.
> Remove __devexit_p.
>
> Signed-off-by: Axel Lin<axel.lin@ingics.com>
> ---
>   drivers/regulator/lp8755.c |    9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/regulator/lp8755.c b/drivers/regulator/lp8755.c
> index dbc4d12..06a82e2 100644
> --- a/drivers/regulator/lp8755.c
> +++ b/drivers/regulator/lp8755.c
> @@ -358,7 +358,9 @@ static int lp8755_regulator_init(struct lp8755_chip *pchip)
>   		    regulator_register(&lp8755_regulators[buck_num], &rconfig);
>   		if (IS_ERR(pchip->rdev[buck_num])) {
>   			ret = PTR_ERR(pchip->rdev[buck_num]);
> -			dev_err(pchip->dev, "regulator init failed: buck 0\n");
> +			pchip->rdev[buck_num] = NULL;
> +			dev_err(pchip->dev, "regulator init failed: buck %d\n",
> +				buck_num);
>   			goto err_buck;
>   		}
>   	}
> @@ -367,8 +369,7 @@ static int lp8755_regulator_init(struct lp8755_chip *pchip)
>   
>   err_buck:
>   	for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++)
> -		if (pchip->rdev[icnt] != NULL)
> -			regulator_unregister(pchip->rdev[icnt]);
> +		regulator_unregister(pchip->rdev[icnt]);
>   	return ret;
>   }
>   
> @@ -557,7 +558,7 @@ static struct i2c_driver lp8755_i2c_driver = {
>   		   .name = LP8755_NAME,
>   		   },
>   	.probe = lp8755_probe,
> -	.remove = __devexit_p(lp8755_remove),
> +	.remove = lp8755_remove,
>   	.id_table = lp8755_id,
>   };
>   
> -- 1.7.9.5
Thank you Alex.
I will check your patch and test it using my board.

      reply	other threads:[~2012-12-26  1:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-25  2:06 [PATCH] regulator: lp8755: Fix lp8755_regulator_init unwind code Axel Lin
2012-12-26  1:16 ` gshark [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=50DA500B.5090305@gmail.com \
    --to=gshark.jeong@gmail.com \
    --cc=axel.lin@ingics.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.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