static int ad7887_remove(struct spi_device *spi) { struct ad7887_state *st = spi_get_drvdata(spi); struct iio_dev *indio_dev = st->indio_dev; iio_ring_buffer_unregister(indio_dev->ring); ad7887_ring_cleanup(indio_dev); iio_device_unregister(indio_dev); if (!IS_ERR(st->reg)) { regulator_disable(st->reg); regulator_put(st->reg); } kfree(st); return 0; }
static int __devexit ad7298_remove(struct spi_device *spi) { struct iio_dev *indio_dev = spi_get_drvdata(spi); struct ad7298_state *st = iio_priv(indio_dev); iio_ring_buffer_unregister(indio_dev->ring); ad7298_ring_cleanup(indio_dev); iio_device_unregister(indio_dev); if (!IS_ERR(st->reg)) { regulator_disable(st->reg); regulator_put(st->reg); } iio_device_unregister(indio_dev); return 0; }
void lis3l02dq_uninitialize_ring(struct iio_ring_buffer *ring) { iio_ring_buffer_unregister(ring); }
void max1363_uninitialize_ring(struct iio_ring_buffer *ring) { iio_ring_buffer_unregister(ring); };
void adis16209_uninitialize_ring(struct iio_ring_buffer *ring) { iio_ring_buffer_unregister(ring); }