iio:buffer_cb: Add missing iio_buffer_init()
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 18 Sep 2013 20:02:00 +0000 (21:02 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 21 Sep 2013 11:52:50 +0000 (12:52 +0100)
Make sure to properly initialize the IIO buffer data structure.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/buffer_cb.c

index 9d19ba74f22bd92125501e2827ef51bbae59da13..415f3c6efd7293087cc1d5fa9313e9de308e6245 100644 (file)
@@ -41,6 +41,8 @@ struct iio_cb_buffer *iio_channel_get_all_cb(struct device *dev,
                goto error_ret;
        }
 
+       iio_buffer_init(&cb_buff->buffer);
+
        cb_buff->private = private;
        cb_buff->cb = cb;
        cb_buff->buffer.access = &iio_cb_access;