diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2013-03-25 23:36:35 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-31 17:41:21 +0400 |
commit | c444914af9261b57c9a559cc324dcadce7765bd2 (patch) | |
tree | b5e85bcc0827ec82c7d3fda4311cd4f71b8a3923 /drivers/media/platform/s5p-fimc/fimc-m2m.c | |
parent | 95c4a17f79232a61546c7359ede1a5d1042f1b76 (diff) | |
download | linux-c444914af9261b57c9a559cc324dcadce7765bd2.tar.xz |
[media] s5p-fimc: Use vb2 ioctl/fop helpers in FIMC capture driver
mmap/poll file operation and several ioctl handlers are replaced
with the vb2 helper functions. Some helpers are used indirectly
to maintain the buffer queue ownership.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/s5p-fimc/fimc-m2m.c')
-rw-r--r-- | drivers/media/platform/s5p-fimc/fimc-m2m.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-m2m.c b/drivers/media/platform/s5p-fimc/fimc-m2m.c index f3d535cdd87f..c8509dd1776d 100644 --- a/drivers/media/platform/s5p-fimc/fimc-m2m.c +++ b/drivers/media/platform/s5p-fimc/fimc-m2m.c @@ -667,16 +667,15 @@ static int fimc_m2m_open(struct file *file) struct fimc_ctx *ctx; int ret = -EBUSY; - dbg("pid: %d, state: 0x%lx, refcnt: %d", - task_pid_nr(current), fimc->state, fimc->vid_cap.refcnt); + pr_debug("pid: %d, state: %#lx\n", task_pid_nr(current), fimc->state); if (mutex_lock_interruptible(&fimc->lock)) return -ERESTARTSYS; /* - * Return if the corresponding video capture node - * is already opened. + * Don't allow simultaneous open() of the mem-to-mem and the + * capture video node that belong to same FIMC IP instance. */ - if (fimc->vid_cap.refcnt > 0) + if (test_bit(ST_CAPT_BUSY, &fimc->state)) goto unlock; ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); |