Skip to content

Commit

Permalink
[media] sh_veu: keep power supply until the m2m context is released
Browse files Browse the repository at this point in the history
In the sh_veu driver, only the interrupt handler 'sh_veu_bh'
can invoke the v4l2_m2m_job_finish() function.
So the hardware must be alive for handling interrupts
until returning from v4l2_m2m_ctx_release().

Signed-off-by: Katsuya Matsubara <matsu@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Katsuya Matsubara authored and Mauro Carvalho Chehab committed Jun 9, 2013
1 parent 9166e1a commit 6abb3cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/platform/sh_veu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1033,8 +1033,6 @@ static int sh_veu_release(struct file *file)

dev_dbg(veu->dev, "Releasing instance %p\n", veu_file);

pm_runtime_put(veu->dev);

if (veu_file == veu->capture) {
veu->capture = NULL;
vb2_queue_release(v4l2_m2m_get_vq(veu->m2m_ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE));
Expand All @@ -1050,6 +1048,8 @@ static int sh_veu_release(struct file *file)
veu->m2m_ctx = NULL;
}

pm_runtime_put(veu->dev);

kfree(veu_file);

return 0;
Expand Down

0 comments on commit 6abb3cf

Please sign in to comment.