regulator: max77686: Check pdata->num_regulators earlier
authorAxel Lin <axel.lin@gmail.com>
Fri, 8 Jun 2012 04:03:04 +0000 (12:03 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 11 Jun 2012 04:01:42 +0000 (12:01 +0800)
commitab0d1cbe55014ac65cfc317f8ef2cd5fa4b7d4da
tree969e3bd8ce1075bb36e60b93dc3042e52d2a7c7c
parentd01c3a1e1b1e4e417202adf1e9dec0730eb00e2b
regulator: max77686: Check pdata->num_regulators earlier

If this driver only works when pdata->num_regulators == MAX77686_REGULATORS,
let's check it earlier.

Also remove unused num_regulators from struct max77686_data.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/max77686.c