diff options
author | Jonathan Cameron <jic23@kernel.org> | 2011-12-05 22:18:17 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-08 12:11:09 -0800 |
commit | 443a9ea56644f9989282c88b7a7fcce9eb501a69 (patch) | |
tree | 8cb91bbacc4aee10373dd3ff593f00a2f4ff222f /drivers/staging/iio/accel/lis3l02dq_core.c | |
parent | 66748b5ada7fb847882baf56e910da7bae75670d (diff) | |
download | linux-443a9ea56644f9989282c88b7a7fcce9eb501a69.tar.bz2 |
staging:iio:accel:lis3l02dq scrap reading from buffer for sysfs access.
No obvious usecase and complicates in kernel interface work.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/accel/lis3l02dq_core.c')
-rw-r--r-- | drivers/staging/iio/accel/lis3l02dq_core.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c index cdc9fc562fba..3d99f8b65a85 100644 --- a/drivers/staging/iio/accel/lis3l02dq_core.c +++ b/drivers/staging/iio/accel/lis3l02dq_core.c @@ -260,12 +260,9 @@ static int lis3l02dq_read_raw(struct iio_dev *indio_dev, case 0: /* Take the iio_dev status lock */ mutex_lock(&indio_dev->mlock); - if (indio_dev->currentmode == INDIO_BUFFER_TRIGGERED) - ret = lis3l02dq_read_accel_from_buffer(indio_dev-> - buffer, - chan->scan_index, - val); - else { + if (indio_dev->currentmode == INDIO_BUFFER_TRIGGERED) { + ret = -EBUSY; + } else { reg = lis3l02dq_axis_map [LIS3L02DQ_ACCEL][chan->address]; ret = lis3l02dq_read_reg_s16(indio_dev, reg, val); |