diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2011-12-19 15:23:48 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-22 13:38:09 -0800 |
commit | 869871b58c7f7c26ccf7a89cbe599e9b963b8e69 (patch) | |
tree | 8835f3b8496c2c1228886762786a247930208c0a /drivers/staging/iio/industrialio-buffer.c | |
parent | 307276cb8366d9c163160fe2775f5bfe7b9c1495 (diff) | |
download | op-kernel-dev-869871b58c7f7c26ccf7a89cbe599e9b963b8e69.zip op-kernel-dev-869871b58c7f7c26ccf7a89cbe599e9b963b8e69.tar.gz |
staging:iio: Drop buffer mark_param_change callback
Right now we have a mark_param_change callback in the buffer access
functions struct, which should be called whenever the parameters (length,
bytes per datum) of the buffer change. But it is only called when the user
changes the buffer size, not when the bytes per datum change. Additionally each
buffer implementation already keeps track internally whether its parameters
have changed, making the call to mark_param_change after changing the buffer
length redundant. Since each buffer implementation knows best when one of its
parameters has changed just make tracking of this internal and drop the
mark_param_change callback.
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-buffer.c')
-rw-r--r-- | drivers/staging/iio/industrialio-buffer.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/iio/industrialio-buffer.c b/drivers/staging/iio/industrialio-buffer.c index 4c6d183..d2858ff 100644 --- a/drivers/staging/iio/industrialio-buffer.c +++ b/drivers/staging/iio/industrialio-buffer.c @@ -399,11 +399,8 @@ ssize_t iio_buffer_write_length(struct device *dev, if (iio_buffer_enabled(indio_dev)) { ret = -EBUSY; } else { - if (buffer->access->set_length) { + if (buffer->access->set_length) buffer->access->set_length(buffer, val); - if (buffer->access->mark_param_change) - buffer->access->mark_param_change(buffer); - } ret = 0; } mutex_unlock(&indio_dev->mlock); |