[media] pwc: poll(): Check that the device has not beem claimed for streaming already
authorHans de Goede <hdegoede@redhat.com>
Sun, 9 Oct 2011 13:28:27 +0000 (10:28 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 27 Mar 2012 14:42:04 +0000 (11:42 -0300)
commit296da3cd14db9eb5606924962b2956c9c656dbb0
treeba0e1014a0aca90e7a0b1e58047fd610ad84db7a
parent0bf0f713d6e6b9f1c510d598c29ac17812a4eea5
[media] pwc: poll(): Check that the device has not beem claimed for streaming already

Some apps which use read() start the streaming through a call to poll(),
this means that if another app has already claimed the device for streaming
(through for example a s_fmt, or a reqbufs), that the poll should fail instead
of getting passed through to vb2_poll.

We only check for this when the app is polling for reads, so that ctrl events
still work.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/pwc/pwc-if.c