diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2010-07-11 15:39:14 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-22 18:38:28 (GMT) |
commit | 2662051e0868d1bde0abeea19bd54c3c18941afc (patch) | |
tree | 87a63f47af6c27463aa71c11c8be5e2f2cfdde7a /drivers/staging/iio/gyro/adis16260_core.c | |
parent | e0bcb775e8643816a07bf52c6587bb269695fee9 (diff) | |
download | linux-fsl-qoriq-2662051e0868d1bde0abeea19bd54c3c18941afc.tar.xz |
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/gyro/adis16260_core.c')
-rw-r--r-- | drivers/staging/iio/gyro/adis16260_core.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/iio/gyro/adis16260_core.c b/drivers/staging/iio/gyro/adis16260_core.c index f0246a4..134dfaa 100644 --- a/drivers/staging/iio/gyro/adis16260_core.c +++ b/drivers/staging/iio/gyro/adis16260_core.c @@ -20,6 +20,7 @@ #include "../iio.h" #include "../sysfs.h" +#include "../ring_generic.h" #include "../adc/adc.h" #include "gyro.h" @@ -555,8 +556,7 @@ static int __devinit adis16260_probe(struct spi_device *spi) if (ret) goto error_unreg_ring_funcs; regdone = 1; - - ret = adis16260_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; @@ -588,7 +588,7 @@ error_unregister_line: if (spi->irq) iio_unregister_interrupt_line(st->indio_dev, 0); error_uninitialize_ring: - adis16260_uninitialize_ring(st->indio_dev->ring); + iio_ring_buffer_unregister(st->indio_dev->ring); error_unreg_ring_funcs: adis16260_unconfigure_ring(st->indio_dev); error_free_dev: @@ -622,15 +622,13 @@ static int adis16260_remove(struct spi_device *spi) if (spi->irq) iio_unregister_interrupt_line(indio_dev, 0); - adis16260_uninitialize_ring(indio_dev->ring); + iio_ring_buffer_unregister(st->indio_dev->ring); iio_device_unregister(indio_dev); adis16260_unconfigure_ring(indio_dev); kfree(st->tx); kfree(st->rx); kfree(st); - return 0; - err_ret: return ret; } |