staging: iio: push the main buffer chrdev down to the top level.
[deliverable/linux.git] / drivers / staging / iio / adc / ad7476_core.c
index c21089894d28b70c9d4e7277d0bdcf089dcf8c9e..bea9e82057fc961bc27263734e41da5075b48700 100644 (file)
 #include <linux/spi/spi.h>
 #include <linux/regulator/consumer.h>
 #include <linux/err.h>
+#include <linux/module.h>
 
 #include "../iio.h"
 #include "../sysfs.h"
 #include "../ring_generic.h"
-#include "adc.h"
 
 #include "ad7476.h"
 
@@ -186,7 +186,7 @@ static int __devinit ad7476_probe(struct spi_device *spi)
        if (ret)
                goto error_disable_reg;
 
-       ret = iio_ring_buffer_register_ex(indio_dev->ring, 0,
+       ret = iio_ring_buffer_register_ex(indio_dev, 0,
                                          st->chip_info->channel,
                                          ARRAY_SIZE(st->chip_info->channel));
        if (ret)
@@ -215,7 +215,7 @@ static int ad7476_remove(struct spi_device *spi)
        /* copy needed as st will have been freed */
        struct regulator *reg = st->reg;
 
-       iio_ring_buffer_unregister(indio_dev->ring);
+       iio_ring_buffer_unregister(indio_dev);
        ad7476_ring_cleanup(indio_dev);
        iio_device_unregister(indio_dev);
        if (!IS_ERR(reg)) {
This page took 0.025776 seconds and 5 git commands to generate.