aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videobuf2-core.c
diff options
context:
space:
mode:
authorPawel Osciak <pawel@osciak.com>2011-03-20 17:17:34 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-22 03:55:07 -0400
commit4ffabdb35ad59fdb8cb6ad3ff4733694ff0dfc35 (patch)
tree36ad1bc445c2b52f6f98e98a3b964dc7503baffc /drivers/media/video/videobuf2-core.c
parent950720840f392075b19d902e5ca7806a17a562cb (diff)
[media] vb2: vb2_poll() fix return values for file I/O mode
poll() should be returning poll-specific error values, not E* errors. Signed-off-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/videobuf2-core.c')
-rw-r--r--drivers/media/video/videobuf2-core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c
index ce032255f3e..8c6f04bc4d8 100644
--- a/drivers/media/video/videobuf2-core.c
+++ b/drivers/media/video/videobuf2-core.c
@@ -1364,18 +1364,18 @@ unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait)
1364 struct vb2_buffer *vb = NULL; 1364 struct vb2_buffer *vb = NULL;
1365 1365
1366 /* 1366 /*
1367 * Start file io emulator if streaming api has not been used yet. 1367 * Start file I/O emulator only if streaming API has not been used yet.
1368 */ 1368 */
1369 if (q->num_buffers == 0 && q->fileio == NULL) { 1369 if (q->num_buffers == 0 && q->fileio == NULL) {
1370 if (!V4L2_TYPE_IS_OUTPUT(q->type) && (q->io_modes & VB2_READ)) { 1370 if (!V4L2_TYPE_IS_OUTPUT(q->type) && (q->io_modes & VB2_READ)) {
1371 ret = __vb2_init_fileio(q, 1); 1371 ret = __vb2_init_fileio(q, 1);
1372 if (ret) 1372 if (ret)
1373 return ret; 1373 return POLLERR;
1374 } 1374 }
1375 if (V4L2_TYPE_IS_OUTPUT(q->type) && (q->io_modes & VB2_WRITE)) { 1375 if (V4L2_TYPE_IS_OUTPUT(q->type) && (q->io_modes & VB2_WRITE)) {
1376 ret = __vb2_init_fileio(q, 0); 1376 ret = __vb2_init_fileio(q, 0);
1377 if (ret) 1377 if (ret)
1378 return ret; 1378 return POLLERR;
1379 /* 1379 /*
1380 * Write to OUTPUT queue can be done immediately. 1380 * Write to OUTPUT queue can be done immediately.
1381 */ 1381 */