linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org, greg@kroah.com
Cc: lars@metafoo.de, Jonathan Cameron <jic23@kernel.org>
Subject: [PATCH 07/19] staging:iio:adc:ad7192 scrap read from buffer for sysfs access.
Date: Mon,  5 Dec 2011 22:18:18 +0000	[thread overview]
Message-ID: <1323123510-21388-8-git-send-email-jic23@kernel.org> (raw)
In-Reply-To: <1323123510-21388-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>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
---
 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 1b6ecc8..66cc507 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);
-- 
1.7.7.4

  parent reply	other threads:[~2011-12-05 22:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1323123510-21388-1-git-send-email-jic23@kernel.org>
2011-12-05 22:18 ` [PATCH 01/19] staging:iio:buffer drop bpe field Jonathan Cameron
2011-12-05 22:18 ` [PATCH 02/19] staging:iio: remove userspace access to bytes per datum Jonathan Cameron
2011-12-05 22:18 ` [PATCH 04/19] staging:iio: scrap scan_count and ensure all drivers use active_scan_mask Jonathan Cameron
2011-12-05 22:18 ` Jonathan Cameron [this message]
2011-12-05 22:18 ` [PATCH 12/19] staging:iio:adc:ad7887 stop reading from buffer for sysfs access Jonathan Cameron
2011-12-05 22:18 ` [PATCH 15/19] staging:iio:ring_sw don't provide read last function Jonathan Cameron
2011-12-05 22:18 ` [PATCH 17/19] staging:iio:buffer scrap to_iio_buffer as it no longer has meaning Jonathan Cameron
2011-12-05 22:18 ` [PATCH 18/19] staging:iio:buffer struct iio_buffer doesn't need an indio_dev pointer Jonathan Cameron
2011-12-05 22:18 ` [PATCH 19/19] staging:iio:buffer.h update struct buffer docs Jonathan Cameron
2011-12-08 20:14 ` [PATCH 00/19] staging:iio:buffer clean ups Greg KH
2011-12-10 14:00   ` Jonathan Cameron

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=1323123510-21388-8-git-send-email-jic23@kernel.org \
    --to=jic23@kernel.org \
    --cc=greg@kroah.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    /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).