diff options
author | Christian Gromm <christian.gromm@microchip.com> | 2015-09-28 17:18:35 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-29 03:18:49 +0200 |
commit | f13f6981bca3c79ba97c4092ab5ed6aed8b2ce99 (patch) | |
tree | 7d8ab0de3da61089e314cd22fff2242c431d9ded /drivers/staging/most/aim-cdev | |
parent | 9161e9311c29e905c8b1cf9f10f5010239d49975 (diff) | |
download | linux-f13f6981bca3c79ba97c4092ab5ed6aed8b2ce99.tar.bz2 |
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-cdev')
-rw-r--r-- | drivers/staging/most/aim-cdev/cdev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c index 1a17e2af6a60..a8a7689231ac 100644 --- a/drivers/staging/most/aim-cdev/cdev.c +++ b/drivers/staging/most/aim-cdev/cdev.c @@ -27,6 +27,7 @@ static dev_t aim_devno; static struct class *aim_class; static struct ida minor_id; static unsigned int major; +static struct most_aim cdev_aim; struct aim_channel { wait_queue_head_t wq; @@ -96,7 +97,7 @@ static int aim_open(struct inode *inode, struct file *filp) return -EBUSY; } - ret = most_start_channel(channel->iface, channel->channel_id); + ret = most_start_channel(channel->iface, channel->channel_id, &cdev_aim); if (ret) atomic_dec(&channel->access_ref); return ret; @@ -134,7 +135,7 @@ static int aim_close(struct inode *inode, struct file *filp) most_put_mbo(mbo); if (channel->keep_mbo) most_put_mbo(channel->stacked_mbo); - ret = most_stop_channel(channel->iface, channel->channel_id); + ret = most_stop_channel(channel->iface, channel->channel_id, &cdev_aim); atomic_dec(&channel->access_ref); wake_up_interruptible(&channel->wq); return ret; |