Turn power off after disabling clocks.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ibd5df109f2664edea7a42fc797945bd31c11f1d2
if (dev->curr_ctx == ctx->num)
clear_bit(0, &dev->hw_lock);
dev->num_inst--;
+ mfc_debug(2, "Shutting down clock\n");
+ s5p_mfc_clock_off();
if (dev->num_inst == 0) {
mfc_debug(2, "Last instance\n");
s5p_mfc_deinit_hw(dev);
if (s5p_mfc_power_off() < 0)
mfc_err("Power off failed\n");
}
- mfc_debug(2, "Shutting down clock\n");
- s5p_mfc_clock_off();
dev->ctx[ctx->num] = NULL;
s5p_mfc_dec_ctrls_delete(ctx);
v4l2_fh_del(&ctx->fh);