Regulators: lp3971 - fail if platform data was not supplied
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 24 Feb 2010 07:38:17 +0000 (23:38 -0800)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Wed, 3 Mar 2010 14:49:28 +0000 (14:49 +0000)
commitebbed04fe7f89c9cb00df32f7123bc1b84b456cb
treef0f672bee06bf5512ebce4b61363feff1658fd47
parent56c23492b2266fcbe38f26a3de217902c70a895b
Regulators: lp3971 - fail if platform data was not supplied

There is no point in completing probe if platform data is missing so
let's abort loading early.

Also, use kcalloc when allocating several instances of the same data
structure and mark setup_regulators() as __devinit since it is only
called from lp3971_i2c_probe() which is __devinit.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/lp3971.c