diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2010-07-11 15:39:09 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-22 18:38:27 (GMT) |
commit | 15744090c5ad3ed404a541bdec6f4f9ae1996fc9 (patch) | |
tree | b74883d12de89db0f7d3d3ba4c800e3889df3785 /drivers/staging/iio/gyro/adis16260_ring.c | |
parent | 3c9bbf58b2a7e9099343d36a2c0b206f8c2450df (diff) | |
download | linux-fsl-qoriq-15744090c5ad3ed404a541bdec6f4f9ae1996fc9.tar.xz |
staging: iio: Add and convert drivers to use iio_alloc_pollfunc
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/gyro/adis16260_ring.c')
-rw-r--r-- | drivers/staging/iio/gyro/adis16260_ring.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/staging/iio/gyro/adis16260_ring.c b/drivers/staging/iio/gyro/adis16260_ring.c index 2fe7f02..bf3c2e8 100644 --- a/drivers/staging/iio/gyro/adis16260_ring.c +++ b/drivers/staging/iio/gyro/adis16260_ring.c @@ -231,13 +231,10 @@ int adis16260_configure_ring(struct iio_dev *indio_dev) ring->predisable = &adis16260_data_rdy_ring_predisable; ring->owner = THIS_MODULE; - indio_dev->pollfunc = kzalloc(sizeof(*indio_dev->pollfunc), GFP_KERNEL); - if (indio_dev->pollfunc == NULL) { - ret = -ENOMEM; - goto error_iio_sw_rb_free;; - } - indio_dev->pollfunc->poll_func_main = &adis16260_poll_func_th; - indio_dev->pollfunc->private_data = indio_dev; + ret = iio_alloc_pollfunc(indio_dev, NULL, &adis16260_poll_func_th); + if (ret) + goto error_iio_sw_rb_free; + indio_dev->modes |= INDIO_RING_TRIGGERED; return 0; |