From: apollo.ling Date: Thu, 18 Jun 2020 12:15:22 +0000 (+0800) Subject: vdec: initialize work before interrupt comming [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ff10c21017ac56d031386fe164300274af259272;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_media.git vdec: initialize work before interrupt comming [1/1] PD#SWPL-27087 Problem: The work is executed before it is initialized. Solution: initialize work before interrupt comming Verify: AC214 Change-Id: Ida18f12e390e518421b498f6373a3e30766d91f4 Signed-off-by: apollo.ling --- diff --git a/drivers/frame_provider/decoder/avs/avs.c b/drivers/frame_provider/decoder/avs/avs.c index 323f322..3dfc799 100644 --- a/drivers/frame_provider/decoder/avs/avs.c +++ b/drivers/frame_provider/decoder/avs/avs.c @@ -1716,21 +1716,20 @@ static int amvdec_avs_probe(struct platform_device *pdev) INIT_WORK(&set_clk_work, avs_set_clk); vdec = pdata; - if (vavs_init() < 0) { - pr_info("amvdec_avs init failed.\n"); - kfree(gvs); - gvs = NULL; - pdata->dec_status = NULL; - return -ENODEV; - } INIT_WORK(&fatal_error_wd_work, vavs_fatal_error_handler); atomic_set(&error_handler_run, 0); INIT_WORK(&userdata_push_work, userdata_push_do_work); - INIT_WORK(¬ify_work, vavs_notify_work); + if (vavs_init() < 0) { + pr_info("amvdec_avs init failed.\n"); + kfree(gvs); + gvs = NULL; + pdata->dec_status = NULL; + return -ENODEV; + } return 0; } diff --git a/drivers/frame_provider/decoder/real/vreal.c b/drivers/frame_provider/decoder/real/vreal.c index 49bd408..f6474b6 100644 --- a/drivers/frame_provider/decoder/real/vreal.c +++ b/drivers/frame_provider/decoder/real/vreal.c @@ -945,12 +945,12 @@ static int amvdec_real_probe(struct platform_device *pdev) pdata->set_isreset = vreal_set_isreset; is_reset = 0; + INIT_WORK(&set_clk_work, vreal_set_clk); if (vreal_init(pdata) < 0) { pr_info("amvdec_real init failed.\n"); pdata->dec_status = NULL; return -ENODEV; } - INIT_WORK(&set_clk_work, vreal_set_clk); return 0; }