From: Mark Brown <broonie@kernel.org>
To: Markus Pargmann <mpa@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>,
Sascha Hauer <kernel@pengutronix.de>,
Liam Girdwood <lgirdwood@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 0/2] regulator: core: Fix ops->enable/disable usage
Date: Tue, 25 Feb 2014 10:34:24 +0900 [thread overview]
Message-ID: <20140225013424.GL25940@sirena.org.uk> (raw)
In-Reply-To: <20140224205058.GA18317@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1290 bytes --]
On Mon, Feb 24, 2014 at 09:50:58PM +0100, Markus Pargmann wrote:
> The only situation where this returns -EINVAL is a dummy regulator that
> is not always_on. As it doesn't make sense to have a dummy regulator
> that is not always_on, I will add a check for exactly this situation to
> the regulator_register function and drop the "return -EINVAL" above.
I've squashed the following fix in today:
From 937635aa9c667b90b76505de91c5693da6a5c120 Mon Sep 17 00:00:00 2001
From: Mark Brown <broonie@linaro.org>
Date: Tue, 25 Feb 2014 10:24:55 +0900
Subject: [PATCH] regulator: Handle invalid enable operation for always/boot on
regulators
Signed-off-by: Mark Brown <broonie@linaro.org>
---
drivers/regulator/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 8cbc7d7..9a09f3c 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1017,7 +1017,7 @@ static int set_machine_constraints(struct regulator_dev *rdev,
*/
if (rdev->constraints->always_on || rdev->constraints->boot_on) {
ret = _regulator_do_enable(rdev);
- if (ret < 0) {
+ if (ret < 0 && ret != -EINVAL) {
rdev_err(rdev, "failed to enable\n");
goto out;
}
--
1.9.0.rc3
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-02-25 1:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-20 16:36 [PATCH v3 0/2] regulator: core: Fix ops->enable/disable usage Markus Pargmann
2014-02-20 16:36 ` [PATCH v3 1/2] regulator: core: Replace direct ops->enable usage Markus Pargmann
2014-02-20 16:36 ` [PATCH v3 2/2] regulator: core: Replace direct ops->disable usage Markus Pargmann
2014-02-23 5:12 ` [PATCH v3 0/2] regulator: core: Fix ops->enable/disable usage Mark Brown
2014-02-24 17:23 ` Fabio Estevam
2014-02-24 20:50 ` Markus Pargmann
2014-02-25 1:34 ` Mark Brown [this message]
2014-02-25 2:18 ` Fabio Estevam
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=20140225013424.GL25940@sirena.org.uk \
--to=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpa@pengutronix.de \
/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