aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/adc/max1363_ring.c
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@kernel.org>2011-12-05 22:18:25 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-08 12:11:12 -0800
commit3ca34cc462aa26c748ea194e6c5047a00c915bc4 (patch)
tree6b03ad5d18937f0c2a7b75d984d7d3799d6d0d46 /drivers/staging/iio/adc/max1363_ring.c
parent729bbf5404d322e73b5bece968b1ca59d13474de (diff)
staging:iio:adc:max1363 stop reading from buffer for sysfs access
No known use case and makes in kernel interface work more complex. 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/max1363_ring.c')
-rw-r--r--drivers/staging/iio/adc/max1363_ring.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/drivers/staging/iio/adc/max1363_ring.c b/drivers/staging/iio/adc/max1363_ring.c
index 3a38a267b58..f730b3fb971 100644
--- a/drivers/staging/iio/adc/max1363_ring.c
+++ b/drivers/staging/iio/adc/max1363_ring.c
@@ -21,42 +21,6 @@
#include "max1363.h"
-int max1363_single_channel_from_ring(const long *mask, struct max1363_state *st)
-{
- struct iio_buffer *ring = iio_priv_to_dev(st)->buffer;
- int count = 0, ret, index;
- u8 *ring_data;
- index = find_first_bit(mask, MAX1363_MAX_CHANNELS);
-
- if (!(test_bit(index, st->current_mode->modemask))) {
- ret = -EBUSY;
- goto error_ret;
- }
-
- ring_data = kmalloc(ring->access->get_bytes_per_datum(ring),
- GFP_KERNEL);
- if (ring_data == NULL) {
- ret = -ENOMEM;
- goto error_ret;
- }
- ret = ring->access->read_last(ring, ring_data);
- if (ret)
- goto error_free_ring_data;
- /* Need a count of channels prior to this one */
-
- count = bitmap_weight(mask, index - 1);
- if (st->chip_info->bits != 8)
- ret = ((int)(ring_data[count*2 + 0] & 0x0F) << 8)
- + (int)(ring_data[count*2 + 1]);
- else
- ret = ring_data[count];
-
-error_free_ring_data:
- kfree(ring_data);
-error_ret:
- return ret;
-}
-
int max1363_update_scan_mode(struct iio_dev *indio_dev,
const unsigned long *scan_mask)
{