Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193021
b: refs/heads/master
c: 53aaf07
h: refs/heads/master
i:
  193019: 8133ad3
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed May 19, 2010
1 parent e63d543 commit 496b3e2
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 53 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 33435167e6dc9e23a97a494cec6b8ca47f8ded75
refs/heads/master: 53aaf07637baae8f53c33b803bbc96047d8da1c4
10 changes: 4 additions & 6 deletions trunk/drivers/media/video/videobuf-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,20 +311,18 @@ static void videobuf_status(struct videobuf_queue *q, struct v4l2_buffer *b,
static int __videobuf_mmap_free(struct videobuf_queue *q)
{
int i;
int rc;

if (!q)
return 0;

MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS);

rc = CALL(q, mmap_free, q);
for (i = 0; i < VIDEO_MAX_FRAME; i++)
if (q->bufs[i] && q->bufs[i]->map)
return -EBUSY;

q->is_mmapped = 0;

if (rc < 0)
return rc;

for (i = 0; i < VIDEO_MAX_FRAME; i++) {
if (NULL == q->bufs[i])
continue;
Expand All @@ -333,7 +331,7 @@ static int __videobuf_mmap_free(struct videobuf_queue *q)
q->bufs[i] = NULL;
}

return rc;
return 0;
}

int videobuf_mmap_free(struct videobuf_queue *q)
Expand Down
14 changes: 0 additions & 14 deletions trunk/drivers/media/video/videobuf-dma-contig.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,19 +263,6 @@ static int __videobuf_iolock(struct videobuf_queue *q,
return 0;
}

static int __videobuf_mmap_free(struct videobuf_queue *q)
{
unsigned int i;

dev_dbg(q->dev, "%s\n", __func__);
for (i = 0; i < VIDEO_MAX_FRAME; i++) {
if (q->bufs[i] && q->bufs[i]->map)
return -EBUSY;
}

return 0;
}

static int __videobuf_mmap_mapper(struct videobuf_queue *q,
struct vm_area_struct *vma)
{
Expand Down Expand Up @@ -424,7 +411,6 @@ static struct videobuf_qtype_ops qops = {

.alloc = __videobuf_alloc,
.iolock = __videobuf_iolock,
.mmap_free = __videobuf_mmap_free,
.mmap_mapper = __videobuf_mmap_mapper,
.video_copy_to_user = __videobuf_copy_to_user,
.copy_stream = __videobuf_copy_stream,
Expand Down
15 changes: 0 additions & 15 deletions trunk/drivers/media/video/videobuf-dma-sg.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,20 +548,6 @@ static int __videobuf_sync(struct videobuf_queue *q,
return videobuf_dma_sync(q, &mem->dma);
}

static int __videobuf_mmap_free(struct videobuf_queue *q)
{
int i;

for (i = 0; i < VIDEO_MAX_FRAME; i++) {
if (q->bufs[i]) {
if (q->bufs[i]->map)
return -EBUSY;
}
}

return 0;
}

static int __videobuf_mmap_mapper(struct videobuf_queue *q,
struct vm_area_struct *vma)
{
Expand Down Expand Up @@ -711,7 +697,6 @@ static struct videobuf_qtype_ops sg_ops = {
.alloc = __videobuf_alloc,
.iolock = __videobuf_iolock,
.sync = __videobuf_sync,
.mmap_free = __videobuf_mmap_free,
.mmap_mapper = __videobuf_mmap_mapper,
.video_copy_to_user = __videobuf_copy_to_user,
.copy_stream = __videobuf_copy_stream,
Expand Down
16 changes: 0 additions & 16 deletions trunk/drivers/media/video/videobuf-vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,21 +235,6 @@ static int __videobuf_sync(struct videobuf_queue *q,
return 0;
}

static int __videobuf_mmap_free(struct videobuf_queue *q)
{
unsigned int i;

dprintk(1, "%s\n", __func__);
for (i = 0; i < VIDEO_MAX_FRAME; i++) {
if (q->bufs[i]) {
if (q->bufs[i]->map)
return -EBUSY;
}
}

return 0;
}

static int __videobuf_mmap_mapper(struct videobuf_queue *q,
struct vm_area_struct *vma)
{
Expand Down Expand Up @@ -385,7 +370,6 @@ static struct videobuf_qtype_ops qops = {
.alloc = __videobuf_alloc,
.iolock = __videobuf_iolock,
.sync = __videobuf_sync,
.mmap_free = __videobuf_mmap_free,
.mmap_mapper = __videobuf_mmap_mapper,
.video_copy_to_user = __videobuf_copy_to_user,
.copy_stream = __videobuf_copy_stream,
Expand Down
1 change: 0 additions & 1 deletion trunk/include/media/videobuf-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ struct videobuf_qtype_ops {
size_t pos,
int vbihack,
int nonblocking);
int (*mmap_free) (struct videobuf_queue *q);
int (*mmap_mapper) (struct videobuf_queue *q,
struct vm_area_struct *vma);
};
Expand Down

0 comments on commit 496b3e2

Please sign in to comment.