diff options
author | Jonathan Cameron <jic23@kernel.org> | 2011-12-05 22:18:19 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-08 20:11:10 (GMT) |
commit | 389ac488330d9946a0f7dd572acd790e41486a9e (patch) | |
tree | caffa46f9cc96f965aea11fcf33b4d34df14b161 /drivers/staging/iio/adc/ad7298_core.c | |
parent | e0f0ddad805e98ae725d52a6cc23ac114ecf6114 (diff) | |
download | linux-fsl-qoriq-389ac488330d9946a0f7dd572acd790e41486a9e.tar.xz |
staging:iio:adc:ad7476 scrap read from buffer for sysfs access.
No known use case 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/adc/ad7298_core.c')
-rw-r--r-- | drivers/staging/iio/adc/ad7298_core.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/iio/adc/ad7298_core.c b/drivers/staging/iio/adc/ad7298_core.c index 656b77b..a8341f2 100644 --- a/drivers/staging/iio/adc/ad7298_core.c +++ b/drivers/staging/iio/adc/ad7298_core.c @@ -123,12 +123,8 @@ static int ad7298_read_raw(struct iio_dev *indio_dev, switch (m) { case 0: mutex_lock(&indio_dev->mlock); - if (iio_buffer_enabled(indio_dev)) { - if (chan->address == AD7298_CH_TEMP) - ret = -ENODEV; - else - ret = ad7298_scan_from_ring(indio_dev, - chan->address); + if (indio_dev->currentmode == INDIO_BUFFER_TRIGGERED) { + ret = -EBUSY; } else { if (chan->address == AD7298_CH_TEMP) ret = ad7298_scan_temp(st, val); |