This is a note to let you know that I've just added the patch titled iio: mxs-lradc: Remove useless check in read_raw to the 3.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: iio-mxs-lradc-remove-useless-check-in-read_raw.patch and it can be found in the queue-3.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 2a961d0995cdadbfba565b28beada59c5ae7ebae Mon Sep 17 00:00:00 2001 From: Marek Vasut <marex@xxxxxxx> Date: Wed, 3 Jul 2013 22:25:00 +0100 Subject: iio: mxs-lradc: Remove useless check in read_raw From: Marek Vasut <marex@xxxxxxx> commit 2a961d0995cdadbfba565b28beada59c5ae7ebae upstream. The removed check in the read_raw implementation was always true, therefore remove it. This also fixes a bug, by closely inspecting the code, one can notice the iio_validate_scan_mask_onehot() will always return 1 and therefore the subsequent condition will always succeed, therefore making the mxs_lradc_read_raw() function always return -EINVAL; . Signed-off-by: Marek Vasut <marex@xxxxxxx> Tested-by: Otavio Salvador <otavio@xxxxxxxxxxxxxxxx> Acked-by: Hector Palacios <hector.palacios@xxxxxxxx> Signed-off-by: Jonathan Cameron <jic23@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/iio/adc/mxs-lradc.c | 7 ------- 1 file changed, 7 deletions(-) --- 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 { 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 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 Patches currently in stable-queue which might be from marex@xxxxxxx are queue-3.10/iio-mxs-lradc-remove-useless-check-in-read_raw.patch queue-3.10/iio-mxs-lradc-fix-misuse-of-iio-trig.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html