diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2016-11-16 07:04:53 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-30 09:17:18 -0200 |
commit | 8accb8fdf6ea6e1e4eb513e88e06d629ed01103b (patch) | |
tree | 2aabd54382480045982af46640d5e18ddf15a489 /drivers/media | |
parent | 2e4e084465dd21f8a76c9fc5da496009d5803ada (diff) | |
download | op-kernel-dev-8accb8fdf6ea6e1e4eb513e88e06d629ed01103b.zip op-kernel-dev-8accb8fdf6ea6e1e4eb513e88e06d629ed01103b.tar.gz |
[media] s5p-mfc: Ensure that clock is disabled before turning power off
Move clock disabling before turning power off. This will enable later
to add calls to clk_prepare/unprepare in the s5p_mfc_power_off() function
to avoid keeping clocks prepared all the time when driver is bound.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index da735cd..9916491 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -963,11 +963,13 @@ static int s5p_mfc_release(struct file *file) mfc_debug(2, "Last instance\n"); s5p_mfc_deinit_hw(dev); del_timer_sync(&dev->watchdog_timer); + s5p_mfc_clock_off(); if (s5p_mfc_power_off() < 0) mfc_err("Power off failed\n"); + } else { + mfc_debug(2, "Shutting down clock\n"); + s5p_mfc_clock_off(); } - mfc_debug(2, "Shutting down clock\n"); - s5p_mfc_clock_off(); } if (dev) dev->ctx[ctx->num] = NULL; |