From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: lars@metafoo.de, Michael.Hennerich@analog.com,
manuel.stahl@iis.fraunhofer.de,
Jonathan Cameron <jic23@kernel.org>
Subject: [PATCH 10/16] staging:iio:adc:ad7606 remove buffer access to data from sysfs read.
Date: Sun, 27 Nov 2011 13:33:39 +0000 [thread overview]
Message-ID: <1322400825-29400-11-git-send-email-jic23@kernel.org> (raw)
In-Reply-To: <1322400825-29400-1-git-send-email-jic23@kernel.org>
No known use case and complicates in kernel interface work.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
drivers/staging/iio/adc/ad7606.h | 1 -
drivers/staging/iio/adc/ad7606_core.c | 2 +-
drivers/staging/iio/adc/ad7606_ring.c | 24 ------------------------
3 files changed, 1 insertions(+), 26 deletions(-)
diff --git a/drivers/staging/iio/adc/ad7606.h b/drivers/staging/iio/adc/ad7606.h
index 35018c3..10f5989 100644
--- a/drivers/staging/iio/adc/ad7606.h
+++ b/drivers/staging/iio/adc/ad7606.h
@@ -99,7 +99,6 @@ enum ad7606_supported_device_ids {
ID_AD7606_4
};
-int ad7606_scan_from_ring(struct iio_dev *indio_dev, unsigned ch);
int ad7606_register_ring_funcs_and_init(struct iio_dev *indio_dev);
void ad7606_ring_cleanup(struct iio_dev *indio_dev);
#endif /* IIO_ADC_AD7606_H_ */
diff --git a/drivers/staging/iio/adc/ad7606_core.c b/drivers/staging/iio/adc/ad7606_core.c
index a8596b8..da25846 100644
--- a/drivers/staging/iio/adc/ad7606_core.c
+++ b/drivers/staging/iio/adc/ad7606_core.c
@@ -91,7 +91,7 @@ static int ad7606_read_raw(struct iio_dev *indio_dev,
case 0:
mutex_lock(&indio_dev->mlock);
if (iio_buffer_enabled(indio_dev))
- ret = ad7606_scan_from_ring(indio_dev, chan->address);
+ ret = -EBUSY;
else
ret = ad7606_scan_direct(indio_dev, chan->address);
mutex_unlock(&indio_dev->mlock);
diff --git a/drivers/staging/iio/adc/ad7606_ring.c b/drivers/staging/iio/adc/ad7606_ring.c
index f682af6..e8f94a1 100644
--- a/drivers/staging/iio/adc/ad7606_ring.c
+++ b/drivers/staging/iio/adc/ad7606_ring.c
@@ -18,30 +18,6 @@
#include "ad7606.h"
-int ad7606_scan_from_ring(struct iio_dev *indio_dev, unsigned ch)
-{
- struct iio_buffer *ring = indio_dev->buffer;
- int ret;
- u16 *ring_data;
-
- 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, (u8 *) ring_data);
- if (ret)
- goto error_free_ring_data;
-
- ret = ring_data[ch];
-
-error_free_ring_data:
- kfree(ring_data);
-error_ret:
- return ret;
-}
-
/**
* ad7606_trigger_handler_th() th/bh of trigger launched polling to ring buffer
*
--
1.7.7.3
next prev parent reply other threads:[~2011-11-27 13:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-27 13:33 [PATCH 00/16] staging:iio: buffer cleanup series Jonathan Cameron
2011-11-27 13:33 ` [PATCH 01/16] staging:iio:buffer drop bpe field Jonathan Cameron
2011-11-27 13:33 ` [PATCH 02/16] staging:iio: remove userspace access to bytes per datum Jonathan Cameron
2011-11-27 13:33 ` [PATCH 03/16] staging:iio:buffer move setup ops from buffer instance to iio_dev Jonathan Cameron
2011-11-27 13:33 ` [PATCH 04/16] staging:iio: scrap scan_count and ensure all drivers use active_scan_mask Jonathan Cameron
2011-11-28 9:45 ` Lars-Peter Clausen
2011-11-28 16:15 ` Lars-Peter Clausen
2011-11-28 21:02 ` Jonathan Cameron
2011-11-28 21:19 ` Lars-Peter Clausen
2011-11-28 21:31 ` Jonathan Cameron
2011-11-27 13:33 ` [PATCH 05/16] staging:iio:buffer remove unused owner field from struct iio_buffer Jonathan Cameron
2011-11-27 13:33 ` [PATCH 06/16] staging:iio:accel:lis3l02dq scrap reading from buffer for sysfs access Jonathan Cameron
2011-11-27 13:33 ` Jonathan Cameron [this message]
2011-11-27 13:33 ` [PATCH 11/16] staging:iio:adc:ad7993 stop reading from buffer for sysfs raw read Jonathan Cameron
2011-11-27 13:33 ` [PATCH 12/16] staging:iio:adc:ad7887 stop reading from buffer for sysfs access Jonathan Cameron
2011-11-27 13:33 ` [PATCH 13/16] staging:iio:adc:ad799x stop reading from buffer for sysfs accesses Jonathan Cameron
2011-11-27 13:33 ` [PATCH 14/16] staging:iio:adc:max1363 stop reading from buffer for sysfs access Jonathan Cameron
2011-11-27 13:33 ` [PATCH 15/16] staging:iio:ring_sw don't provide read last function Jonathan Cameron
2011-11-27 13:33 ` [PATCH 16/16] staging:iio:buffer stop allowing for read_last callback Jonathan Cameron
2011-12-04 21:44 ` [PATCH 00/16] staging:iio: buffer cleanup series Lars-Peter Clausen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1322400825-29400-11-git-send-email-jic23@kernel.org \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=manuel.stahl@iis.fraunhofer.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).