V4L/DVB (6997): Replace a very dirty hack on videobuf for a clean wait_event
In order to videobuf_iolock to work, mmap_mapper should be called first.
Otherwise, an OOPS is generated.
On some cases, .mmap file handler used to took some time to be called. On those
situations, mmap_mmapper() were called after iolock.
This patch properly waits for mmap_mapper to be called, otherwise generating an
error.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
diff --git a/include/media/videobuf-core.h b/include/media/videobuf-core.h
index 7aa7a7b..97f14d4 100644
--- a/include/media/videobuf-core.h
+++ b/include/media/videobuf-core.h
@@ -164,6 +164,8 @@
unsigned int streaming:1;
unsigned int reading:1;
+ unsigned int is_mmapped:1;
+
/* capture via mmap() + ioctl(QBUF/DQBUF) */
struct list_head stream;