From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 04/12] regulator: gpio-regulator: gpio_set_value should use cansleep
Date: Mon, 10 Dec 2012 08:55:53 +0000 [thread overview]
Message-ID: <1355129761-8088-5-git-send-email-lee.jones@linaro.org> (raw)
In-Reply-To: <1355129761-8088-1-git-send-email-lee.jones@linaro.org>
If it's possible for gpio_set_value to sleep, we should be using
the *_cansleep call instead. This patch fixes multiple warnings
from gpiolib.
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/regulator/gpio-regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
index 5462c28..90f5221 100644
--- a/drivers/regulator/gpio-regulator.c
+++ b/drivers/regulator/gpio-regulator.c
@@ -82,7 +82,7 @@ static int gpio_regulator_set_voltage(struct regulator_dev *dev,
for (ptr = 0; ptr < data->nr_gpios; ptr++) {
state = (target & (1 << ptr)) >> ptr;
- gpio_set_value(data->gpios[ptr].gpio, state);
+ gpio_set_value_cansleep(data->gpios[ptr].gpio, state);
}
data->state = target;
@@ -119,7 +119,7 @@ static int gpio_regulator_set_current_limit(struct regulator_dev *dev,
for (ptr = 0; ptr < data->nr_gpios; ptr++) {
state = (target & (1 << ptr)) >> ptr;
- gpio_set_value(data->gpios[ptr].gpio, state);
+ gpio_set_value_cansleep(data->gpios[ptr].gpio, state);
}
data->state = target;
--
1.7.9.5
next prev parent reply other threads:[~2012-12-10 8:55 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 8:55 [PATCH 00/12] Functionality add and bug-fixes related to MMCI regulators Lee Jones
2012-12-10 8:55 ` [PATCH 01/12] regulator: gpio-regulator: Demote GPIO Regulator driver to start later Lee Jones
2012-12-10 14:07 ` Mark Brown
2012-12-10 14:28 ` Lee Jones
2012-12-10 14:31 ` Mark Brown
2012-12-13 11:55 ` Lee Jones
2012-12-14 2:53 ` Mark Brown
2012-12-10 8:55 ` [PATCH 02/12] regulator: gpio-regulator: Only read GPIO [dis|en]able pin if not always-on Lee Jones
2012-12-10 14:10 ` Mark Brown
2012-12-13 11:48 ` Lee Jones
2012-12-14 2:46 ` Mark Brown
2012-12-10 8:55 ` [PATCH 03/12] regulator: gpio-regulator: Fix logical error in for() loop Lee Jones
2012-12-10 14:12 ` Mark Brown
2012-12-10 8:55 ` Lee Jones [this message]
2012-12-10 14:13 ` [PATCH 04/12] regulator: gpio-regulator: gpio_set_value should use cansleep Mark Brown
2012-12-10 8:55 ` [PATCH 05/12] mmc: mmci: Move ios_handler functionality into the driver Lee Jones
2012-12-10 8:55 ` [PATCH 06/12] ARM: ux500: Set correct MMCI regulator voltages in the ux5x0 Device Tree Lee Jones
2012-12-11 9:17 ` Linus Walleij
2012-12-11 9:37 ` Ulf Hansson
2012-12-11 9:54 ` Lee Jones
2012-12-10 8:55 ` [PATCH 07/12] ARM: ux500: Specify the ux5x0 MMCI regulator's on/off GPIO as high-enable Lee Jones
2012-12-11 9:17 ` Linus Walleij
2012-12-10 8:55 ` [PATCH 08/12] ARM: ux500: Specify which IOS regulator to use for MMCI Lee Jones
2012-12-11 9:18 ` Linus Walleij
2012-12-10 8:55 ` [PATCH 09/12] ARM: ux500: Use the correct name when supplying a GPIO enable pin Lee Jones
2012-12-11 9:18 ` Linus Walleij
2012-12-10 8:55 ` [PATCH 10/12] ARM: ux500: Setup correct settling time for the MMCI regulator Lee Jones
2012-12-11 9:18 ` Linus Walleij
2012-12-10 8:56 ` [PATCH 11/12] ARM: ux500: Use the GPIO regulator framework for SDI0's 'en' and 'vsel' Lee Jones
2012-12-10 10:18 ` Ulf Hansson
2012-12-10 10:20 ` Ulf Hansson
2012-12-10 10:30 ` Lee Jones
2012-12-10 12:06 ` Ulf Hansson
2012-12-10 11:08 ` [PATCH 11/12 v2] " Lee Jones
2012-12-10 12:20 ` Ulf Hansson
2012-12-10 8:56 ` [PATCH 12/12] ARM: ux500: Remove traces of the ios_handler from platform code Lee Jones
2012-12-11 9:19 ` Linus Walleij
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=1355129761-8088-5-git-send-email-lee.jones@linaro.org \
--to=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).