regulator: max8998 - set max8998->num_regulators
authorAxel Lin <axel.lin@gmail.com>
Sun, 22 Aug 2010 07:26:49 +0000 (15:26 +0800)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Wed, 1 Sep 2010 11:59:34 +0000 (12:59 +0100)
Set max8998->num_regulators = pdata->num_regulators,
otherwise it's default value is 0.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/max8998.c

index fbcb385034a92e28e0d89cf24dc48e58f9ee7d27..8b9bfdf8ffe5b6953cecf830f3cda45c12e9126e 100644 (file)
@@ -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++) {