regulator: max8998 - set max8998->num_regulators
PATCH 1/1 regulator: max8998 - set max8998->num_regulators
Set max8998->num_regulators = pdata->num_regulators, otherwise it's default value is 0.
Signed-off-by Axel Lin <[email protected]>
--- drivers/regulator/max8998.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/regulator/max8998.c +1 -0
@@ -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
Quoted 4 lines · Axel Lin
Set
max8998->num_regulators=pdata->num_regulators, otherwise it's default value is 0.Signed-off-by Axel Lin <[email protected]>
Acked-by Mark Brown <[email protected]>
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.
Liam Girdwood
AppliedQuoted 7 lines · Mark Brown
Quoted 4 lines · Axel Lin
Set
max8998->num_regulators=pdata->num_regulators, otherwise it's default value is 0.Signed-off-by Axel Lin <[email protected]>Acked-by Mark Brown <[email protected]>
Applied.
Thanks
Liam
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk