]> git.baikalelectronics.ru Git - kernel.git/commit
media: staging: rkisp1: params: upon stream stop, iterate a local list to return...
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Tue, 22 Sep 2020 11:33:51 +0000 (13:33 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 27 Sep 2020 09:32:03 +0000 (11:32 +0200)
commit731ef37bd93218997944f1b7643a4c4c5ce281f5
tree250f217924ef13d93149daaee78a7c94ae376461
parent176e83a090d2d3a0af0a945a10b1529da0dcef46
media: staging: rkisp1: params: upon stream stop, iterate a local list to return the buffers

The code in '.stop_streaming' callback releases and acquire the lock
at each iteration when returning the buffers.
Holding the lock disables interrupts so it should be minimized.
To make the code cleaner and still minimize holding the lock,
the buffer list is first moved to a local list and
then can be iterated without the 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-params.c