Skip to contentSkip to conversation

regulator: Fix build error for ab8500

PATCH In review Axel Lin 3 participants 6 messages Apr 10, 2012 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/3 regulator: Fix build error for ab8500

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

---
 drivers/regulator/ab8500.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/regulator/ab8500.c +3 -3
index 93feada..d156390 100644
@@ -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) {
Signature · 1 line
1.7.5.4
author
#1 lore raw

PATCH 2/3 regulator: Fix a typo in da903x.c

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

---
 drivers/regulator/da903x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/da903x.c +1 -1
index 4630b1e..682bdb3 100644
@@ -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);
Signature · 1 line
1.7.5.4
#2 lore raw

Re: [PATCH 2/3] regulator: Fix a typo in da903x.c

Quoted 2 lines · Axel Lin

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.

author
#3 lore raw

PATCH 3/3 regulator: Fix build error for mc13783 and mc13892

In reply to Axel Lin

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

---
 drivers/regulator/mc13783-regulator.c |   12 +++++++++---
 drivers/regulator/mc13892-regulator.c |    8 ++++++--
 2 files changed, 15 insertions(+), 5 deletions(-)
drivers/regulator/mc13783-regulator.c +9 -3
index 6c0face..7dcdfa2 100644
@@ -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);
drivers/regulator/mc13892-regulator.c +6 -2
index 8830807..970a233 100644
@@ -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);
Signature · 1 line
1.7.5.4
Acked-by on v1 1/3
#4 lore raw
In reply to Axel Lin
Quoted 12 lines · Axel Lin

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

Quoted 2 lines

Thanks Axel,
Linus Walleij

#5 lore raw
In reply to Axel Lin
Quoted 2 lines · Axel Lin

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

Already fixed.