OSDN Git Service

media: vim2m: Remove unneeded buffer lock
authorEzequiel Garcia <ezequiel@collabora.com>
Sat, 28 Mar 2020 14:44:16 +0000 (15:44 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 14 Apr 2020 10:06:23 +0000 (12:06 +0200)
commit9d3bf4cd9f1e04012679aca71db4ff540b8bf30d
treedd88b56350ebcf14c99842ac4a20db691f2a0b78
parente472d6a2594bb78277c5c7272f8867652aee9591
media: vim2m: Remove unneeded buffer lock

This spinlock is used solely to call v4l2_m2m_buf_done().

Since buffers are obtained only after being removed
from the ready queue, there's no concurrent access, and
so no need for synchronization.

Remove the spinlock to make sure no one copies this pattern.

Some archaeology shows this is a small leftover from ancient code.
This driver (then called m2m_testdev) used the videobuf1 framework;
commit d80ee38cd845 ("[media] v4l: mem2mem: port m2m_testdev to vb2")
converted it to videobuf2. The spinlock was then no longer needed,
and this simply went unnoticed.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/test_drivers/vim2m.c