From: Liam Girdwood <lrg@kernel.org>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org, patches@opensource.wolfsonmicro.com
Subject: Re: [PATCH] regulator: Factor out references to rdev in regulator_force_disable()
Date: Mon, 09 May 2011 17:02:23 +0100 [thread overview]
Message-ID: <1304956943.3192.19.camel@odin> (raw)
In-Reply-To: <1304934062-22847-1-git-send-email-broonie@opensource.wolfsonmicro.com>
On Mon, 2011-05-09 at 11:41 +0200, Mark Brown wrote:
> Don't go looking up the rdev pointer every time, just use a local variable
> like everything else.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> drivers/regulator/core.c | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index c5b3c50..58452ac 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -1508,13 +1508,14 @@ static int _regulator_force_disable(struct regulator_dev *rdev,
> */
> int regulator_force_disable(struct regulator *regulator)
> {
> + struct regulator_dev *rdev = regulator->rdev;
> struct regulator_dev *supply_rdev = NULL;
> int ret;
>
> - mutex_lock(®ulator->rdev->mutex);
> + mutex_lock(&rdev->mutex);
> regulator->uA_load = 0;
> - ret = _regulator_force_disable(regulator->rdev, &supply_rdev);
> - mutex_unlock(®ulator->rdev->mutex);
> + ret = _regulator_force_disable(rdev, &supply_rdev);
> + mutex_unlock(&rdev->mutex);
>
> if (supply_rdev)
> regulator_disable(get_device_regulator(rdev_get_dev(supply_rdev)));
Applied.
Thanks
Liam
prev parent reply other threads:[~2011-05-09 16:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-09 9:41 [PATCH] regulator: Factor out references to rdev in regulator_force_disable() Mark Brown
2011-05-09 16:02 ` Liam Girdwood [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=1304956943.3192.19.camel@odin \
--to=lrg@kernel.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.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.