mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
media: atomisp: Rework asd->streaming state update in __atomisp_streamoff()
During the first __atomisp_streamoff() call on an asd with only one pipe streaming asd->streaming would get set twice: asd->streaming = ATOMISP_DEVICE_STREAMING_STOPPING; asd->streaming = ATOMISP_DEVICE_STREAMING_DISABLED; Rework the code a bit so that it gets set to the correct value right away instead of doing this in 2 steps. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
0ecc5236d1
commit
1636369bcf
|
|
@ -1930,14 +1930,14 @@ int __atomisp_streamoff(struct file *file, void *fh, enum v4l2_buf_type type)
|
|||
if (!pipe->capq.streaming)
|
||||
return 0;
|
||||
|
||||
spin_lock_irqsave(&isp->lock, flags);
|
||||
if (asd->streaming == ATOMISP_DEVICE_STREAMING_ENABLED) {
|
||||
asd->streaming = ATOMISP_DEVICE_STREAMING_STOPPING;
|
||||
if (asd->streaming == ATOMISP_DEVICE_STREAMING_ENABLED)
|
||||
first_streamoff = true;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&isp->lock, flags);
|
||||
if (atomisp_subdev_streaming_count(asd) == 1)
|
||||
asd->streaming = ATOMISP_DEVICE_STREAMING_DISABLED;
|
||||
else
|
||||
asd->streaming = ATOMISP_DEVICE_STREAMING_STOPPING;
|
||||
spin_unlock_irqrestore(&isp->lock, flags);
|
||||
|
||||
if (!first_streamoff) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user