On 10/22/2012 10:42 AM, Lars-Peter Clausen wrote: > The function is expected to return the number of bytes consumed and as long as > not all bytes have been consumed the function will be called again. Currently > the function returns 'ret', which will always be 0 in this case, so we end up in > a endless loop since the caller will assume that no bytes have been consumed. So > instead return len as it is supposed to. > > Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx> Added to fixes-togreg branch of iio.git > --- > drivers/staging/iio/adc/adt7410.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/iio/adc/adt7410.c b/drivers/staging/iio/adc/adt7410.c > index 4157596..3cf5103 100644 > --- a/drivers/staging/iio/adc/adt7410.c > +++ b/drivers/staging/iio/adc/adt7410.c > @@ -190,7 +190,7 @@ static ssize_t adt7410_store_mode(struct device *dev, > > chip->config = config; > > - return ret; > + return len; > } > > static IIO_DEVICE_ATTR(mode, S_IRUGO | S_IWUSR, > -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html