From: Lars-Peter Clausen Date: Mon, 14 Oct 2013 16:49:00 +0000 (+0100) Subject: iio:st_gyro: Remove redundant call to iio_sw_buffer_preenable(). X-Git-Tag: v3.13-rc1~170^2~196^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4b2911b1ff4bece34fd662b9e056ac97c36b193;p=kernel%2Fkernel-generic.git iio:st_gyro: Remove redundant call to iio_sw_buffer_preenable(). 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 Cc: Denis Ciocca Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/gyro/st_gyro_buffer.c b/drivers/iio/gyro/st_gyro_buffer.c index 69017c7..d67b17b 100644 --- a/drivers/iio/gyro/st_gyro_buffer.c +++ b/drivers/iio/gyro/st_gyro_buffer.c @@ -32,16 +32,7 @@ int st_gyro_trig_set_state(struct iio_trigger *trig, bool state) static int st_gyro_buffer_preenable(struct iio_dev *indio_dev) { - int err; - - err = st_sensors_set_enable(indio_dev, true); - if (err < 0) - goto st_gyro_set_enable_error; - - err = iio_sw_buffer_preenable(indio_dev); - -st_gyro_set_enable_error: - return err; + return st_sensors_set_enable(indio_dev, true); } static int st_gyro_buffer_postenable(struct iio_dev *indio_dev)