summaryrefslogtreecommitdiff
path: root/drivers/staging/most/aim-v4l2
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2015-09-28 17:18:35 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-29 03:18:49 +0200
commitf13f6981bca3c79ba97c4092ab5ed6aed8b2ce99 (patch)
tree7d8ab0de3da61089e314cd22fff2242c431d9ded /drivers/staging/most/aim-v4l2
parent9161e9311c29e905c8b1cf9f10f5010239d49975 (diff)
staging: most: fix channel operation in multi-aim context
This patch fixes the opening and closing process of a physical channel when used by different AIMs. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most/aim-v4l2')
-rw-r--r--drivers/staging/most/aim-v4l2/video.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/most/aim-v4l2/video.c b/drivers/staging/most/aim-v4l2/video.c
index 377bb107c94c..345a82437311 100644
--- a/drivers/staging/most/aim-v4l2/video.c
+++ b/drivers/staging/most/aim-v4l2/video.c
@@ -32,6 +32,7 @@
#define V4L2_AIM_MAX_INPUT 1
+static struct most_aim aim_info;
struct most_video_dev {
struct most_interface *iface;
@@ -107,7 +108,7 @@ static int aim_vdev_open(struct file *filp)
v4l2_fh_add(&fh->fh);
- ret = most_start_channel(mdev->iface, mdev->ch_idx);
+ ret = most_start_channel(mdev->iface, mdev->ch_idx, &aim_info);
if (ret) {
pr_err("most_start_channel() failed\n");
goto err_rm;
@@ -151,7 +152,7 @@ static int aim_vdev_close(struct file *filp)
spin_lock(&mdev->list_lock);
}
spin_unlock(&mdev->list_lock);
- most_stop_channel(mdev->iface, mdev->ch_idx);
+ most_stop_channel(mdev->iface, mdev->ch_idx, &aim_info);
mdev->mute = false;
v4l2_fh_del(&fh->fh);