Skip to contentSkip to conversation

regulator: max8998 - set max8998->num_regulators

PATCH Applied Axel Lin 3 participants 3 messages Aug 22, 2010 – Aug 24, 2010 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: max8998 - set max8998->num_regulators

Set max8998->num_regulators = pdata->num_regulators, otherwise it's default value is 0.

---
 drivers/regulator/max8998.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/regulator/max8998.c +1 -0
index ab67298..f0d8261 100644
@@ -558,6 +558,7 @@ static __devinit int max8998_pmic_probe(struct platform_device *pdev)
 
 	rdev = max8998->rdev;
 	max8998->iodev = iodev;
+	max8998->num_regulators = pdata->num_regulators;
 	platform_set_drvdata(pdev, max8998);
 
 	for (i = 0; i < pdata->num_regulators; i++) {
Signature · 1 line
1.7.0.4
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Axel Lin

Set max8998->num_regulators = pdata->num_regulators, otherwise it's default value is 0.

With a change like this it's good to note why things worked prior to the change - my first thought was that it might be better to loose the driver data copy entirely if we were fine with it being set to zero.

#2 lore raw
Quoted 7 lines · Mark Brown
Quoted 4 lines · Axel Lin

Set max8998->num_regulators = pdata->num_regulators, otherwise it's default value is 0.

Applied.

Thanks

Liam

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk