#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"
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)
/* 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)) {