regulator: core: remove sysfs entry properly in regulator_put
authorShawn Guo <shawn.guo@linaro.org>
Thu, 5 Jul 2012 06:19:42 +0000 (14:19 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 5 Jul 2012 12:15:40 +0000 (13:15 +0100)
With changes introduced by commit 222cc7b (regulator: core: Allow
multiple requests of a single supply mapping) on create_regulator,
regulator_put needs a corresponding update on sysfs entry removing.

Also regulator->dev still needs to get assigned in create_regulator,
otherwise, sysfs_remove_link call in regulator_put will get bypassed.

Reported-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

No differences found