public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] regulator: Fix build error for ab8500
@ 2012-04-10  5:47 Axel Lin
  2012-04-10  5:49 ` [PATCH 2/3] regulator: Fix a typo in da903x.c Axel Lin
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Axel Lin @ 2012-04-10  5:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Walleij, Bengt JONSSON, Sundar R Iyer, Mark Brown,
	Liam Girdwood, Stephen Rothwell

Fix below build errors which is introduced by commit c172708
"regulator: core: Use a struct to pass in regulator runtime configuration".

  CC      drivers/regulator/ab8500.o
drivers/regulator/ab8500.c: In function 'ab8500_regulator_probe':
drivers/regulator/ab8500.c:783: error: invalid type argument of '->' (have 'struct regulator_config')
drivers/regulator/ab8500.c:784: error: invalid type argument of '->' (have 'struct regulator_config')
drivers/regulator/ab8500.c:785: error: invalid type argument of '->' (have 'struct regulator_config')
make[2]: *** [drivers/regulator/ab8500.o] Error 1
make[1]: *** [drivers/regulator] Error 2
make: *** [drivers] Error 2

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/regulator/ab8500.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 93feada..d156390 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -780,9 +780,9 @@ static __devinit int ab8500_regulator_probe(struct platform_device *pdev)
 		info = &ab8500_regulator_info[i];
 		info->dev = &pdev->dev;
 
-		config->dev = &pdev->dev;
-		config->init_data = &pdata->regulator[i];
-		config->driver_data = info;
+		config.dev = &pdev->dev;
+		config.init_data = &pdata->regulator[i];
+		config.driver_data = info;
 
 		/* fix for hardware before ab8500v2.0 */
 		if (abx500_get_chip_id(info->dev) < 0x20) {
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] regulator: Fix a typo in da903x.c
  2012-04-10  5:47 [PATCH 1/3] regulator: Fix build error for ab8500 Axel Lin
@ 2012-04-10  5:49 ` Axel Lin
  2012-04-10  8:41   ` Mark Brown
  2012-04-10  5:51 ` [PATCH 3/3] regulator: Fix build error for mc13783 and mc13892 Axel Lin
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Axel Lin @ 2012-04-10  5:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Eric Miao, Mike Rapoport, Liam Girdwood, Mark Brown

Fix below build errors which is introduced by commit c172708
"regulator: core: Use a struct to pass in regulator runtime configuration".

  CC      drivers/regulator/da903x.o
drivers/regulator/da903x.c: In function 'da903x_regulator_probe':
drivers/regulator/da903x.c:541: error: 'conifg' undeclared (first use in this function)
drivers/regulator/da903x.c:541: error: (Each undeclared identifier is reported only once
drivers/regulator/da903x.c:541: error: for each function it appears in.)
make[2]: *** [drivers/regulator/da903x.o] Error 1
make[1]: *** [drivers/regulator] Error 2
make: *** [drivers] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/regulator/da903x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/da903x.c b/drivers/regulator/da903x.c
index 4630b1e..682bdb3 100644
--- a/drivers/regulator/da903x.c
+++ b/drivers/regulator/da903x.c
@@ -538,7 +538,7 @@ static int __devinit da903x_regulator_probe(struct platform_device *pdev)
 		ri->desc.ops = &da9030_regulator_ldo1_15_ops;
 
 	config.dev = &pdev->dev;
-	conifg.init_data = pdev->dev.platform_data;
+	config.init_data = pdev->dev.platform_data;
 	config.driver_data = ri;
 
 	rdev = regulator_register(&ri->desc, &config);
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] regulator: Fix build error for mc13783 and mc13892
  2012-04-10  5:47 [PATCH 1/3] regulator: Fix build error for ab8500 Axel Lin
  2012-04-10  5:49 ` [PATCH 2/3] regulator: Fix a typo in da903x.c Axel Lin
@ 2012-04-10  5:51 ` Axel Lin
  2012-04-10  8:06 ` [PATCH 1/3] regulator: Fix build error for ab8500 Linus Walleij
  2012-04-10  8:40 ` Mark Brown
  3 siblings, 0 replies; 6+ messages in thread
From: Axel Lin @ 2012-04-10  5:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Yong Shen, Fabio Estevam, Sascha Hauer, Arnaud Patard,
	Liam Girdwood, Mark Brown

Convert mc13783 and mc13892 to use a struct to pass in regulator runtime
configuration.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/regulator/mc13783-regulator.c |   12 +++++++++---
 drivers/regulator/mc13892-regulator.c |    8 ++++++--
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c
index 6c0face..7dcdfa2 100644
--- a/drivers/regulator/mc13783-regulator.c
+++ b/drivers/regulator/mc13783-regulator.c
@@ -340,6 +340,7 @@ static int __devinit mc13783_regulator_probe(struct platform_device *pdev)
 	struct mc13xxx_regulator_platform_data *pdata =
 		dev_get_platdata(&pdev->dev);
 	struct mc13xxx_regulator_init_data *init_data;
+	struct regulator_config config = { };
 	int i, ret;
 
 	dev_dbg(&pdev->dev, "%s id %d\n", __func__, pdev->id);
@@ -357,11 +358,16 @@ static int __devinit mc13783_regulator_probe(struct platform_device *pdev)
 	priv->mc13xxx = mc13783;
 
 	for (i = 0; i < pdata->num_regulators; i++) {
+		struct regulator_desc *desc;
+
 		init_data = &pdata->regulators[i];
-		priv->regulators[i] = regulator_register(
-				&mc13783_regulators[init_data->id].desc,
-				&pdev->dev, init_data->init_data, priv, NULL);
+		desc = &mc13783_regulators[init_data->id].desc;
+
+		config.dev = &pdev->dev;
+		config.init_data = init_data->init_data;
+		config.driver_data = priv;
 
+		priv->regulators[i] = regulator_register(desc, &config);
 		if (IS_ERR(priv->regulators[i])) {
 			dev_err(&pdev->dev, "failed to register regulator %s\n",
 				mc13783_regulators[i].desc.name);
diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c
index 8830807..970a233 100644
--- a/drivers/regulator/mc13892-regulator.c
+++ b/drivers/regulator/mc13892-regulator.c
@@ -519,6 +519,7 @@ static int __devinit mc13892_regulator_probe(struct platform_device *pdev)
 	struct mc13xxx_regulator_platform_data *pdata =
 		dev_get_platdata(&pdev->dev);
 	struct mc13xxx_regulator_init_data *mc13xxx_data;
+	struct regulator_config config = { };
 	int i, ret;
 	int num_regulators = 0;
 	u32 val;
@@ -588,9 +589,12 @@ static int __devinit mc13892_regulator_probe(struct platform_device *pdev)
 		}
 		desc = &mc13892_regulators[id].desc;
 
-		priv->regulators[i] = regulator_register(
-			desc, &pdev->dev, init_data, priv, node);
+		config.dev = &pdev->dev;
+		config.init_data = init_data;
+		config.driver_data = priv;
+		config.of_node = node;
 
+		priv->regulators[i] = regulator_register(desc, &config);
 		if (IS_ERR(priv->regulators[i])) {
 			dev_err(&pdev->dev, "failed to register regulator %s\n",
 				mc13892_regulators[i].desc.name);
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] regulator: Fix build error for ab8500
  2012-04-10  5:47 [PATCH 1/3] regulator: Fix build error for ab8500 Axel Lin
  2012-04-10  5:49 ` [PATCH 2/3] regulator: Fix a typo in da903x.c Axel Lin
  2012-04-10  5:51 ` [PATCH 3/3] regulator: Fix build error for mc13783 and mc13892 Axel Lin
@ 2012-04-10  8:06 ` Linus Walleij
  2012-04-10  8:40 ` Mark Brown
  3 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2012-04-10  8:06 UTC (permalink / raw)
  To: Axel Lin
  Cc: linux-kernel, Linus Walleij, Bengt JONSSON, Sundar R Iyer,
	Mark Brown, Liam Girdwood, Stephen Rothwell

On Tue, Apr 10, 2012 at 7:47 AM, Axel Lin <axel.lin@gmail.com> wrote:

> Fix below build errors which is introduced by commit c172708
> "regulator: core: Use a struct to pass in regulator runtime configuration".
>
>  CC      drivers/regulator/ab8500.o
> drivers/regulator/ab8500.c: In function 'ab8500_regulator_probe':
> drivers/regulator/ab8500.c:783: error: invalid type argument of '->' (have 'struct regulator_config')
> drivers/regulator/ab8500.c:784: error: invalid type argument of '->' (have 'struct regulator_config')
> drivers/regulator/ab8500.c:785: error: invalid type argument of '->' (have 'struct regulator_config')
> make[2]: *** [drivers/regulator/ab8500.o] Error 1
> make[1]: *** [drivers/regulator] Error 2
> make: *** [drivers] Error 2
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks Axel,
Linus Walleij

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] regulator: Fix build error for ab8500
  2012-04-10  5:47 [PATCH 1/3] regulator: Fix build error for ab8500 Axel Lin
                   ` (2 preceding siblings ...)
  2012-04-10  8:06 ` [PATCH 1/3] regulator: Fix build error for ab8500 Linus Walleij
@ 2012-04-10  8:40 ` Mark Brown
  3 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2012-04-10  8:40 UTC (permalink / raw)
  To: Axel Lin
  Cc: linux-kernel, Linus Walleij, Bengt JONSSON, Sundar R Iyer,
	Liam Girdwood, Stephen Rothwell

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

On Tue, Apr 10, 2012 at 01:47:24PM +0800, Axel Lin wrote:
> Fix below build errors which is introduced by commit c172708
> "regulator: core: Use a struct to pass in regulator runtime configuration".

Already fixed.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] regulator: Fix a typo in da903x.c
  2012-04-10  5:49 ` [PATCH 2/3] regulator: Fix a typo in da903x.c Axel Lin
@ 2012-04-10  8:41   ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2012-04-10  8:41 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Eric Miao, Mike Rapoport, Liam Girdwood

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

On Tue, Apr 10, 2012 at 01:49:24PM +0800, Axel Lin wrote:
> Fix below build errors which is introduced by commit c172708
> "regulator: core: Use a struct to pass in regulator runtime configuration".

Applied this and 3/3.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-04-10  8:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-10  5:47 [PATCH 1/3] regulator: Fix build error for ab8500 Axel Lin
2012-04-10  5:49 ` [PATCH 2/3] regulator: Fix a typo in da903x.c Axel Lin
2012-04-10  8:41   ` Mark Brown
2012-04-10  5:51 ` [PATCH 3/3] regulator: Fix build error for mc13783 and mc13892 Axel Lin
2012-04-10  8:06 ` [PATCH 1/3] regulator: Fix build error for ab8500 Linus Walleij
2012-04-10  8:40 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox