]> git.baikalelectronics.ru Git - kernel.git/commit
media: staging: rkisp1: stats: replace locks wq_lock, irq_lock with one lock
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Fri, 26 Jun 2020 08:51:40 +0000 (10:51 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Jul 2020 08:48:12 +0000 (10:48 +0200)
commit367cf26020fde70fccaff2b521037c6182596b98
tree8fdf33fdf47118aed208983f7515af3ce0001751
parent5d2e6764f667b8c121e9cea57a9a4483278ed7bc
media: staging: rkisp1: stats: replace locks wq_lock, irq_lock with one lock

This patch removes two locks in the rkisp1_stats struct:
- The mutex 'wq_lock' that is used to protect the buffers list 'stat'
- The spin_lock 'irq_lock' that is used to protect the
variable 'is_streaming'

It replaces them with one spin_lock 'lock' that protects
both the buffers list and the 'is_streaming' variable.
In later patch the reading of the statistics will move to
the isr so there will be no need for the mutex 'wq_lock'

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/rkisp1/rkisp1-common.h
drivers/staging/media/rkisp1/rkisp1-stats.c