From: Stephen Boyd <sboyd@codeaurora.org>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@ti.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regulator: Fix recursive mutex lockdep warning
Date: Tue, 03 Jul 2012 15:47:54 -0700 [thread overview]
Message-ID: <4FF3769A.3090703@codeaurora.org> (raw)
In-Reply-To: <20120703224316.GB11368@opensource.wolfsonmicro.com>
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.
next prev parent reply other threads:[~2012-07-03 22:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 2:21 [PATCH] regulator: Fix recursive mutex lockdep warning Stephen Boyd
2012-07-03 19:26 ` Mark Brown
2012-07-03 20:08 ` Stephen Boyd
2012-07-03 22:43 ` Mark Brown
2012-07-03 22:47 ` Stephen Boyd [this message]
2012-07-03 23:06 ` Mark Brown
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=4FF3769A.3090703@codeaurora.org \
--to=sboyd@codeaurora.org \
--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 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.