From: Cho KyongHo Date: Mon, 18 May 2015 07:37:49 +0000 (+0900) Subject: [COMMON] media: smfc: fix inconsistency in hardware state X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e83ada5c332ea043cff66fa4ec8dc6d1b5ffd35f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] media: smfc: fix inconsistency in hardware state Setting SMFC_DEV_RUNNING is after configuring H/W to start working. If IRQ is occurred before configuring the flag, the IRQ handler is called before the flag set. Change-Id: I3f408f569b7265eb368b9efc38cffdb13d79fff2 Signed-off-by: Cho KyongHo --- diff --git a/drivers/media/platform/exynos/smfc/smfc.c b/drivers/media/platform/exynos/smfc/smfc.c index c601f5b94ebe..7a2cc4343fbf 100644 --- a/drivers/media/platform/exynos/smfc/smfc.c +++ b/drivers/media/platform/exynos/smfc/smfc.c @@ -1215,12 +1215,13 @@ static void smfc_m2m_device_run(void *priv) smfc_hwconfigure_2nd_tables(ctx, thumb_quality_factor); smfc_hwconfigure_2nd_image(ctx); } - smfc_hwconfigure_start(ctx, restart_interval, !!enable_hwfc); spin_lock_irqsave(&ctx->smfc->flag_lock, flags); ctx->smfc->flags |= SMFC_DEV_RUNNING; spin_unlock_irqrestore(&ctx->smfc->flag_lock, flags); + smfc_hwconfigure_start(ctx, restart_interval, !!enable_hwfc); + return; err_hwfc: if (!IS_ERR(ctx->smfc->clk_gate)) {