summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/accel/lis3l02dq_core.c
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2010-07-11 16:39:14 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-22 11:38:28 -0700
commit2662051e0868d1bde0abeea19bd54c3c18941afc (patch)
tree87a63f47af6c27463aa71c11c8be5e2f2cfdde7a /drivers/staging/iio/accel/lis3l02dq_core.c
parente0bcb775e8643816a07bf52c6587bb269695fee9 (diff)
staging: iio: Add stubs for iio_ring_buffer_[un]register and equivalent driver stubs
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/accel/lis3l02dq_core.c')
-rw-r--r--drivers/staging/iio/accel/lis3l02dq_core.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c
index 40348695493d..f86ffb838ce2 100644
--- a/drivers/staging/iio/accel/lis3l02dq_core.c
+++ b/drivers/staging/iio/accel/lis3l02dq_core.c
@@ -27,6 +27,7 @@
#include "../iio.h"
#include "../sysfs.h"
+#include "../ring_generic.h"
#include "accel.h"
#include "lis3l02dq.h"
@@ -791,7 +792,7 @@ static int __devinit lis3l02dq_probe(struct spi_device *spi)
goto error_unreg_ring_funcs;
regdone = 1;
- ret = lis3l02dq_initialize_ring(st->indio_dev->ring);
+ ret = iio_ring_buffer_register(st->indio_dev->ring, 0);
if (ret) {
printk(KERN_ERR "failed to initialize the ring\n");
goto error_unreg_ring_funcs;
@@ -825,7 +826,7 @@ error_unregister_line:
if (st->indio_dev->modes & INDIO_RING_TRIGGERED)
iio_unregister_interrupt_line(st->indio_dev, 0);
error_uninitialize_ring:
- lis3l02dq_uninitialize_ring(st->indio_dev->ring);
+ iio_ring_buffer_unregister(st->indio_dev->ring);
error_unreg_ring_funcs:
lis3l02dq_unconfigure_ring(st->indio_dev);
error_free_dev:
@@ -886,7 +887,7 @@ static int lis3l02dq_remove(struct spi_device *spi)
if (spi->irq && gpio_is_valid(irq_to_gpio(spi->irq)) > 0)
iio_unregister_interrupt_line(indio_dev, 0);
- lis3l02dq_uninitialize_ring(indio_dev->ring);
+ iio_ring_buffer_unregister(indio_dev->ring);
lis3l02dq_unconfigure_ring(indio_dev);
iio_device_unregister(indio_dev);
kfree(st->tx);