staging: iio: push the main buffer chrdev down to the top level.
[deliverable/linux.git] / drivers / staging / iio / adc / ad7192.c
index adf6d95dd34fca099880363605e699c929e7f8f6..6e1656e44e372c0cb8ac2c776d3f60c88176116c 100644 (file)
@@ -1098,7 +1098,7 @@ static int __devinit ad7192_probe(struct spi_device *spi)
        if (ret)
                goto error_unreg_ring;
 
-       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)
@@ -1111,7 +1111,7 @@ static int __devinit ad7192_probe(struct spi_device *spi)
        return 0;
 
 error_uninitialize_ring:
-       iio_ring_buffer_unregister(indio_dev->ring);
+       iio_ring_buffer_unregister(indio_dev);
 error_remove_trigger:
        ad7192_remove_trigger(indio_dev);
 error_unreg_ring:
@@ -1136,7 +1136,7 @@ static int ad7192_remove(struct spi_device *spi)
        struct iio_dev *indio_dev = spi_get_drvdata(spi);
        struct ad7192_state *st = iio_priv(indio_dev);
 
-       iio_ring_buffer_unregister(indio_dev->ring);
+       iio_ring_buffer_unregister(indio_dev);
        ad7192_remove_trigger(indio_dev);
        ad7192_ring_cleanup(indio_dev);
 
This page took 0.026351 seconds and 5 git commands to generate.