All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: mxs-lradc: Remove useless check in read_raw
@ 2013-07-02  0:08 Marek Vasut
  2013-07-02  3:38 ` Otavio Salvador
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Marek Vasut @ 2013-07-02  0:08 UTC (permalink / raw)
  To: linux-iio; +Cc: otavio, Marek Vasut, Jonathan Cameron, Fabio Estevam

The removed check in the read_raw implementation was always true,
therefore remove it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/staging/iio/adc/mxs-lradc.c |    7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
index d92c97a..c318eb6 100644
--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -234,7 +234,6 @@ static int mxs_lradc_read_raw(struct iio_dev *iio_dev,
 {
 	struct mxs_lradc *lradc = iio_priv(iio_dev);
 	int ret;
-	unsigned long mask;
 
 	if (m != IIO_CHAN_INFO_RAW)
 		return -EINVAL;
@@ -243,12 +242,6 @@ static int mxs_lradc_read_raw(struct iio_dev *iio_dev,
 	if (chan->channel > LRADC_MAX_TOTAL_CHANS)
 		return -EINVAL;
 
-	/* Validate the channel if it doesn't intersect with reserved chans. */
-	bitmap_set(&mask, chan->channel, 1);
-	ret = iio_validate_scan_mask_onehot(iio_dev, &mask);
-	if (ret)
-		return -EINVAL;
-
 	/*
 	 * See if there is no buffered operation in progess. If there is, simply
 	 * bail out. This can be improved to support both buffered and raw IO at
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-07-03 19:26 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-02  0:08 [PATCH] iio: mxs-lradc: Remove useless check in read_raw Marek Vasut
2013-07-02  3:38 ` Otavio Salvador
2013-07-02 17:58   ` Marek Vasut
2013-07-02  9:19 ` Hector Palacios
2013-07-02 11:43 ` Alexandre Belloni
2013-07-02 11:53   ` Otavio Salvador
2013-07-02 12:03   ` Marek Vasut
2013-07-02 12:49     ` Alexandre Belloni
2013-07-02 16:13       ` Marek Vasut
2013-07-02 16:37         ` Otavio Salvador
2013-07-02 17:36           ` Marek Vasut
2013-07-02 17:42             ` Otavio Salvador
2013-07-02 17:55               ` Marek Vasut
2013-07-03  9:25                 ` Hector Palacios
2013-07-03 11:38                   ` Marek Vasut
2013-07-03 13:58                     ` Hector Palacios
2013-07-03 19:26                       ` Jonathan Cameron
2013-07-02 17:19         ` Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.