diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2011-12-19 15:23:49 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-22 13:38:10 -0800 |
commit | 7933514043d42e69663a5123a53fab50eb0b4aba (patch) | |
tree | 1563ca434350c338176f0c9e6cc4648882ad74d0 /drivers/staging/iio/industrialio-core.c | |
parent | 869871b58c7f7c26ccf7a89cbe599e9b963b8e69 (diff) | |
download | talos-obmc-linux-7933514043d42e69663a5123a53fab50eb0b4aba.tar.gz talos-obmc-linux-7933514043d42e69663a5123a53fab50eb0b4aba.zip |
staging:iio: Drop {mark,unmark}_in_use callbacks
These callbacks are currently used by the individual buffer implementations to
ensure that the request_update callback is not issued while the buffer is in use.
But the core already provides sufficient measures to prevent this from happening
in the first place. So it is safe to remove them.
There is one functional change due to this patch. Since the buffer is no longer
marked as in use when the chrdev is opened, it is now possible to enable the
buffer while it is opened. This did not work before, because mark_param_change
did fail if the buffer was marked as in use.
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/industrialio-core.c')
-rw-r--r-- | drivers/staging/iio/industrialio-core.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c index 12d1576a0766..19f897f3c85e 100644 --- a/drivers/staging/iio/industrialio-core.c +++ b/drivers/staging/iio/industrialio-core.c @@ -1083,18 +1083,13 @@ static int iio_chrdev_open(struct inode *inode, struct file *filp) { struct iio_dev *indio_dev = container_of(inode->i_cdev, struct iio_dev, chrdev); - unsigned int ret; if (test_and_set_bit(IIO_BUSY_BIT_POS, &indio_dev->flags)) return -EBUSY; filp->private_data = indio_dev; - ret = iio_chrdev_buffer_open(indio_dev); - if (ret < 0) - clear_bit(IIO_BUSY_BIT_POS, &indio_dev->flags); - - return ret; + return 0; } /** @@ -1104,7 +1099,6 @@ static int iio_chrdev_release(struct inode *inode, struct file *filp) { struct iio_dev *indio_dev = container_of(inode->i_cdev, struct iio_dev, chrdev); - iio_chrdev_buffer_release(indio_dev); clear_bit(IIO_BUSY_BIT_POS, &indio_dev->flags); return 0; } |