]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/iio/adc/ad7266.c
iio:ad7266: Remove redundant call to iio_sw_preenable()
[karo-tx-linux.git] / drivers / iio / adc / ad7266.c
index f5723cbd2032ce4a8ef0acd71e1261048796e37c..58e945594c7bb7e484588820517c1b067b5c2521 100644 (file)
@@ -61,17 +61,7 @@ static int ad7266_powerdown(struct ad7266_state *st)
 static int ad7266_preenable(struct iio_dev *indio_dev)
 {
        struct ad7266_state *st = iio_priv(indio_dev);
-       int ret;
-
-       ret = ad7266_wakeup(st);
-       if (ret)
-               return ret;
-
-       ret = iio_sw_buffer_preenable(indio_dev);
-       if (ret)
-               ad7266_powerdown(st);
-
-       return ret;
+       return ad7266_wakeup(st);
 }
 
 static int ad7266_postdisable(struct iio_dev *indio_dev)