iio: exynos_adc: rearrange clk and regulator enable/disable calls
authorNaveen Krishna Ch <ch.naveen@samsung.com>
Wed, 30 Apr 2014 09:26:00 +0000 (10:26 +0100)
committerJonathan Cameron <jic23@kernel.org>
Wed, 30 Apr 2014 20:42:53 +0000 (21:42 +0100)
commit2bbc7247259f0d27c84b0e0746bd5e9831e39c36
tree0887f782c905de7d38a545518db3ca3b065b3811
parentb4a2d475ae9baf8fcaa311ba62a404ba1efad147
iio: exynos_adc: rearrange clk and regulator enable/disable calls

This patch maintains the following order in
probe(), remove(), resume() and suspend() calls

regulator enable, clk prepare enable
...
clk disable unprepare, regulator disable

While at it,
1. enable the regulator before the iio_device_register()
2. handle the return values for enable/disable calls

Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/exynos_adc.c