diff options
author | Jonathan Cameron <jic23@kernel.org> | 2011-12-06 02:18:18 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-09 00:11:09 +0400 |
commit | e0f0ddad805e98ae725d52a6cc23ac114ecf6114 (patch) | |
tree | 828604587aba28d931b348e1eabd5d87d52bf558 /drivers/staging/iio/adc/ad7192.c | |
parent | 443a9ea56644f9989282c88b7a7fcce9eb501a69 (diff) | |
download | linux-e0f0ddad805e98ae725d52a6cc23ac114ecf6114.tar.xz |
staging:iio:adc:ad7192 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/ad7192.c')
-rw-r--r-- | drivers/staging/iio/adc/ad7192.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c index 1b6ecc8d69bb..66cc507ab4d2 100644 --- a/drivers/staging/iio/adc/ad7192.c +++ b/drivers/staging/iio/adc/ad7192.c @@ -453,25 +453,6 @@ out: return ret; } -static int ad7192_scan_from_ring(struct ad7192_state *st, unsigned ch, int *val) -{ - struct iio_buffer *ring = iio_priv_to_dev(st)->buffer; - int ret; - s64 dat64[2]; - u32 *dat32 = (u32 *)dat64; - - if (!(test_bit(ch, ring->scan_mask))) - return -EBUSY; - - ret = ring->access->read_last(ring, (u8 *) &dat64); - if (ret) - return ret; - - *val = *dat32; - - return 0; -} - static int ad7192_ring_preenable(struct iio_dev *indio_dev) { struct ad7192_state *st = iio_priv(indio_dev); @@ -875,8 +856,7 @@ static int ad7192_read_raw(struct iio_dev *indio_dev, case 0: mutex_lock(&indio_dev->mlock); if (iio_buffer_enabled(indio_dev)) - ret = ad7192_scan_from_ring(st, - chan->scan_index, &smpl); + ret = -EBUSY; else ret = ad7192_read(st, chan->address, chan->scan_type.realbits / 8, &smpl); |