Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 99cfdf5c authored by Pantelis Koukousoulas's avatar Pantelis Koukousoulas Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (5038): Pvrusb2: Implement stream claim checking function



Add (and expose) a new function, pvr2_channel_check_stream_no_lock(), in
pvrusb2-context.c. This is hopefully the last V4L2 interface related patch
to change anything outside pvrusb2-v4l2.c.

We need this to implement the open() for the radio device. The reason is
that within the *enter_context() section of open() we need to ensure nobody
is streaming and if we cannot, we should cleanup after ourselves and return
 -EBUSY. We cannot just use claim_stream() because:

   1) That would cause a deadlock trying to re-acquire the context lock
   2) We only need to ensure that nobody is streaming. We don't need to
      actually acquire the stream.

Again, this is a kinda ugly patch. Feel free to improve.

Signed-off-by: default avatarPantelis Koukousoulas <pakt223@freemail.gr>
Signed-off-by: default avatarMike Isely <isely@pobox.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 2fdf3d9c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment