ionvideo: Add thread stop protection when the process exits [1/1]

PD#SWPL-1689

Problem:
The thread still exists when the process exits

Solution:
Check if the thread exits when the process exits

Verify:
local

Change-Id: I6d805da6bfa0df85b6d39d065c95eed49b3cb7da
Signed-off-by: Renjiang Han <renjiang.han@amlogic.com>
This commit is contained in:
Renjiang Han
2018-11-08 14:45:50 +08:00
committed by Jianxin Pan
parent 29e995bb40
commit 00c604ba1d

View File

@@ -575,6 +575,11 @@ static int vidioc_close(struct file *file)
{
struct ionvideo_dev *dev = video_drvdata(file);
struct ionvideo_dmaqueue *dma_q = &dev->vidq;
if (dma_q->kthread)
vidioc_streamoff(file, NULL, 0);
IONVID_DBG("vidioc_close!!!!\n");
ppmgr2_release(&(dev->ppmgr2_dev));
//dprintk(dev, 2, "vidioc_close\n");