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)
commitb512ab7a85268b3d43d8c504a3e84dbdd923c52b
tree8fdf33fdf47118aed208983f7515af3ce0001751
parent46c308a964fe6515845eacb8765a2c2e2b8c1570
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