summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/adc/ad7887_core.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-06-18 16:33:55 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-19 00:26:10 (GMT)
commitcc4dd03a6a9535cb2f731c5069e6a02781e3267a (patch)
tree15ff28f22b5153057c9d39d0d94f01d4f7fd7179 /drivers/staging/iio/adc/ad7887_core.c
parent82796edca9ba014aa09cc158240c23b5b3f9326d (diff)
downloadlinux-fsl-qoriq-cc4dd03a6a9535cb2f731c5069e6a02781e3267a.tar.xz
staging:iio:adc:ad7887: Use new triggered buffer setup helper function
Use the new triggered buffer setup helper function to allocate and register buffer and pollfunc. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/iio/adc/ad7887_core.c')
-rw-r--r--drivers/staging/iio/adc/ad7887_core.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/staging/iio/adc/ad7887_core.c b/drivers/staging/iio/adc/ad7887_core.c
index 7186074..397b849 100644
--- a/drivers/staging/iio/adc/ad7887_core.c
+++ b/drivers/staging/iio/adc/ad7887_core.c
@@ -201,20 +201,12 @@ static int __devinit ad7887_probe(struct spi_device *spi)
if (ret)
goto error_disable_reg;
- ret = iio_buffer_register(indio_dev,
- indio_dev->channels,
- indio_dev->num_channels);
- if (ret)
- goto error_cleanup_ring;
-
ret = iio_device_register(indio_dev);
if (ret)
goto error_unregister_ring;
return 0;
error_unregister_ring:
- iio_buffer_unregister(indio_dev);
-error_cleanup_ring:
ad7887_ring_cleanup(indio_dev);
error_disable_reg:
if (!IS_ERR(st->reg))
@@ -233,7 +225,6 @@ static int ad7887_remove(struct spi_device *spi)
struct ad7887_state *st = iio_priv(indio_dev);
iio_device_unregister(indio_dev);
- iio_buffer_unregister(indio_dev);
ad7887_ring_cleanup(indio_dev);
if (!IS_ERR(st->reg)) {
regulator_disable(st->reg);