staging: iio: push the main buffer chrdev down to the top level.
[deliverable/linux.git] / drivers / staging / iio / adc / ad7887_core.c
index 3d9121e5c37d69b44f4e2c2ee1c9424cab984e7e..184ead17afce4992d7a4a352f7844992b8663fed 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 "ad7887.h"
 
@@ -193,7 +194,7 @@ static int __devinit ad7887_probe(struct spi_device *spi)
                goto error_disable_reg;
        regdone = 1;
 
-       ret = iio_ring_buffer_register_ex(indio_dev->ring, 0,
+       ret = iio_ring_buffer_register_ex(indio_dev, 0,
                                          indio_dev->channels,
                                          indio_dev->num_channels);
        if (ret)
@@ -221,7 +222,7 @@ static int ad7887_remove(struct spi_device *spi)
        struct iio_dev *indio_dev = spi_get_drvdata(spi);
        struct ad7887_state *st = iio_priv(indio_dev);
 
-       iio_ring_buffer_unregister(indio_dev->ring);
+       iio_ring_buffer_unregister(indio_dev);
        ad7887_ring_cleanup(indio_dev);
        if (!IS_ERR(st->reg)) {
                regulator_disable(st->reg);
This page took 0.030841 seconds and 5 git commands to generate.