Commit e0f0ddad authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman

staging:iio:adc:ad7192 scrap read from buffer for sysfs access.

No known use case and complicates in kernel interface work.
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 443a9ea5
...@@ -453,25 +453,6 @@ static int ad7192_setup(struct ad7192_state *st) ...@@ -453,25 +453,6 @@ static int ad7192_setup(struct ad7192_state *st)
return ret; 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) static int ad7192_ring_preenable(struct iio_dev *indio_dev)
{ {
struct ad7192_state *st = iio_priv(indio_dev); struct ad7192_state *st = iio_priv(indio_dev);
...@@ -875,8 +856,7 @@ static int ad7192_read_raw(struct iio_dev *indio_dev, ...@@ -875,8 +856,7 @@ static int ad7192_read_raw(struct iio_dev *indio_dev,
case 0: case 0:
mutex_lock(&indio_dev->mlock); mutex_lock(&indio_dev->mlock);
if (iio_buffer_enabled(indio_dev)) if (iio_buffer_enabled(indio_dev))
ret = ad7192_scan_from_ring(st, ret = -EBUSY;
chan->scan_index, &smpl);
else else
ret = ad7192_read(st, chan->address, ret = ad7192_read(st, chan->address,
chan->scan_type.realbits / 8, &smpl); chan->scan_type.realbits / 8, &smpl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment