regulator: core: Replace direct ops->disable usage
authorMarkus Pargmann <mpa@pengutronix.de>
Thu, 20 Feb 2014 16:36:04 +0000 (17:36 +0100)
committerJiri Slaby <jslaby@suse.cz>
Mon, 31 Mar 2014 12:22:31 +0000 (14:22 +0200)
commit8ebdd122d3a30463bf10ea8120939d2f69b1608a
treef591782cb828412e2af3b246cf433e6286fff48c
parentf615b037e16b61fb9358fdd94dec9728b8df90d8
regulator: core: Replace direct ops->disable usage

commit 66fda75f47dc583f1c187556e9a2c082dd64f8c6 upstream.

There are many places where ops->disable is called directly. Instead we
should use _regulator_do_disable() which also handles gpio regulators.

To be able to use the wrapper function from _regulator_force_disable(),
I moved the _notifier_call_chain() call from _regulator_do_disable() to
_regulator_disable(). This way, _regulator_force_disable() can use
different flags for _notifier_call_chain() without calling it twice.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/regulator/core.c