media: atomisp: Simplify atomisp_css_[start|stop]()
authorHans de Goede <hdegoede@redhat.com>
Thu, 11 May 2023 18:27:24 +0000 (19:27 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 9 Jun 2023 13:37:51 +0000 (14:37 +0100)
commit71a85e054f3237595c50b1a74919185597fa2fba
tree21e8c7a8229672968e9f880efe5903a4fa7b9572
parent3f3ee94c89b79c9addaf83b029edec9b720ec1f7
media: atomisp: Simplify atomisp_css_[start|stop]()

Now that continuous mode is gone and we only have 1 /dev/video# node,
the videobuf2 core guarantees that atomisp_css_[start|stop]() will
only be called one at a time.

So there is no need for atomisp_streaming_count() counts.

When reqbufs has been done then the streams are guaranteed to be created,
and streaming cannot be started without reqbufs so there is no need for
atomisp_css_start() to check if it needs to create the streams.

Use this to clean-up atomisp_css_[start|stop]().

While at it also fix atomisp_css_start() not re-creating the streams
on an error, breaking the guarantee that the streams are always there
after a succesfull reqbufs call.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c