iio:st_magn: Remove redundant call to iio_sw_buffer_preenable().
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 14 Oct 2013 16:49:00 +0000 (17:49 +0100)
committerJonathan Cameron <jic23@kernel.org>
Wed, 16 Oct 2013 18:13:50 +0000 (19:13 +0100)
The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core,
so there is no need to do this from the driver anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/magnetometer/st_magn_buffer.c

index 708857bdb47d3d4ba69a0fc65d1512defe4881c9..bf427dc0d226c40de9adc92257ece78ab6b14de6 100644 (file)
 
 static int st_magn_buffer_preenable(struct iio_dev *indio_dev)
 {
-       int err;
-
-       err = st_sensors_set_enable(indio_dev, true);
-       if (err < 0)
-               goto st_magn_set_enable_error;
-
-       err = iio_sw_buffer_preenable(indio_dev);
-
-st_magn_set_enable_error:
-       return err;
+       return st_sensors_set_enable(indio_dev, true);
 }
 
 static int st_magn_buffer_postenable(struct iio_dev *indio_dev)