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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FF3769A.3090703@codeaurora.org>
Date:	Tue, 03 Jul 2012 15:47:54 -0700
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC:	Liam Girdwood <lrg@...com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regulator: Fix recursive mutex lockdep warning

On 07/03/12 15:43, Mark Brown wrote:
>
>> What do you think about removing the locking in get_voltage? Is that better?
> There's already an unlocked version of get_voltage()?

Yes, I'm suggesting we just use that unlocked version for all of the
code that gets the input voltage.

index ef07b62..4c63336 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -628,7 +628,7 @@ static void drms_uA_update(struct regulator_dev *rdev)
        /* get input voltage */
        input_uV = 0;
        if (rdev->supply)
-               input_uV = regulator_get_voltage(rdev->supply);
+               input_uV = _regulator_get_voltage(rdev->supply->rdev);
        if (input_uV <= 0)
                input_uV = rdev->constraints->input_uV;
        if (input_uV <= 0)
@@ -2582,7 +2582,7 @@ int regulator_set_optimum_mode(struct regulator *regulator, int uA_load)
        /* get input voltage */
        input_uV = 0;
        if (rdev->supply)
-               input_uV = regulator_get_voltage(rdev->supply);
+               input_uV = _regulator_get_voltage(rdev->supply->rdev);
        if (input_uV <= 0)
                input_uV = rdev->constraints->input_uV;
        if (input_uV <= 0) {


-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

--
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