regulators: max8973: fix multiple instance support
commitdb892ff6c0f49708f13d9dff3957034f2f90e1c1
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Fri, 21 Jun 2013 06:30:22 +0000 (21 08:30 +0200)
committerMark Brown <broonie@linaro.org>
Fri, 21 Jun 2013 10:00:54 +0000 (21 11:00 +0100)
tree2e3a95dd097cb177b296daa786a9d4fbbe9a09d1
parent7d132055814ef17a6c7b69f342244c410a5e000f
regulators: max8973: fix multiple instance support

Currently the max8973 regulator driver uses a single static struct of
regulator operations for all chip instances, but can overwrite some of its
members depending on configuration. This will affect all other MAX8973
instances on the system. This patch fixes this bug by allocating a separate
copy of the struct for each chip instance.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/max8973-regulator.c