* [PATCH 1/2] regulator: gpio-regulator: Use of_gpio_count()
@ 2013-01-28 14:16 Axel Lin
2013-01-28 14:17 ` [PATCH 2/2] regulator: gpio-regulator: Staticize of_get_gpio_regulator_config() Axel Lin
2013-01-28 16:44 ` [PATCH 1/2] regulator: gpio-regulator: Use of_gpio_count() Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2013-01-28 14:16 UTC (permalink / raw)
To: Mark Brown; +Cc: Heiko Stuebner, Lee Jones, Liam Girdwood, linux-kernel
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/gpio-regulator.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
index bae681c..d819ba7 100644
--- a/drivers/regulator/gpio-regulator.c
+++ b/drivers/regulator/gpio-regulator.c
@@ -163,10 +163,7 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np)
config->enable_gpio = of_get_named_gpio(np, "enable-gpio", 0);
/* Fetch GPIOs. */
- for (i = 0; ; i++)
- if (of_get_named_gpio(np, "gpios", i) < 0)
- break;
- config->nr_gpios = i;
+ config->nr_gpios = of_gpio_count(np);
config->gpios = devm_kzalloc(dev,
sizeof(struct gpio) * config->nr_gpios,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] regulator: gpio-regulator: Staticize of_get_gpio_regulator_config()
2013-01-28 14:16 [PATCH 1/2] regulator: gpio-regulator: Use of_gpio_count() Axel Lin
@ 2013-01-28 14:17 ` Axel Lin
2013-01-28 16:44 ` [PATCH 1/2] regulator: gpio-regulator: Use of_gpio_count() Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Axel Lin @ 2013-01-28 14:17 UTC (permalink / raw)
To: Mark Brown; +Cc: Heiko Stuebner, Lee Jones, Liam Girdwood, linux-kernel
of_get_gpio_regulator_config() is only used in gpio-regulator.c, make it static.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/gpio-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
index d819ba7..9d39eb4 100644
--- a/drivers/regulator/gpio-regulator.c
+++ b/drivers/regulator/gpio-regulator.c
@@ -132,7 +132,7 @@ static struct regulator_ops gpio_regulator_voltage_ops = {
.list_voltage = gpio_regulator_list_voltage,
};
-struct gpio_regulator_config *
+static struct gpio_regulator_config *
of_get_gpio_regulator_config(struct device *dev, struct device_node *np)
{
struct gpio_regulator_config *config;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/2] regulator: gpio-regulator: Use of_gpio_count()
2013-01-28 14:16 [PATCH 1/2] regulator: gpio-regulator: Use of_gpio_count() Axel Lin
2013-01-28 14:17 ` [PATCH 2/2] regulator: gpio-regulator: Staticize of_get_gpio_regulator_config() Axel Lin
@ 2013-01-28 16:44 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-01-28 16:44 UTC (permalink / raw)
To: Axel Lin; +Cc: Heiko Stuebner, Lee Jones, Liam Girdwood, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 129 bytes --]
On Mon, Jan 28, 2013 at 10:16:03PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Applied both, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-28 16:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-28 14:16 [PATCH 1/2] regulator: gpio-regulator: Use of_gpio_count() Axel Lin
2013-01-28 14:17 ` [PATCH 2/2] regulator: gpio-regulator: Staticize of_get_gpio_regulator_config() Axel Lin
2013-01-28 16:44 ` [PATCH 1/2] regulator: gpio-regulator: Use of_gpio_count() Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox