lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 09 May 2011 17:02:23 +0100
From:	Liam Girdwood <lrg@...nel.org>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	linux-kernel@...r.kernel.org, patches@...nsource.wolfsonmicro.com
Subject: Re: [PATCH] regulator: Factor out references to rdev in
 regulator_force_disable()

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@...nsource.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(&regulator->rdev->mutex);
> +	mutex_lock(&rdev->mutex);
>  	regulator->uA_load = 0;
> -	ret = _regulator_force_disable(regulator->rdev, &supply_rdev);
> -	mutex_unlock(&regulator->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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ