regulator: act8865: set correct number of regulators in pdata
authorBeniamino Galvani <b.galvani@gmail.com>
Sat, 5 Jul 2014 13:20:53 +0000 (15:20 +0200)
committerMark Brown <broonie@linaro.org>
Mon, 7 Jul 2014 10:32:31 +0000 (12:32 +0200)
commit732714d0da4f3273e4b9a9dbe3e7556ea1188e36
treeb9b9a7772069485b2d4db367084e438634018d77
parent7171511eaec5bf23fb06078f59784a3a0626b38f
regulator: act8865: set correct number of regulators in pdata

act8865_pdata_from_dt() populates the array pdata->regulators with all
the regulators and then assigns the field init_data only for the ones
actually found in the DT.

The patch changes the value assigned to pdata->num_regulators to match
the size of the array.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Tested-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/act8865-regulator.c