summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/adc
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2010-07-11 16:39:09 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-22 11:38:27 -0700
commit15744090c5ad3ed404a541bdec6f4f9ae1996fc9 (patch)
treeb74883d12de89db0f7d3d3ba4c800e3889df3785 /drivers/staging/iio/adc
parent3c9bbf58b2a7e9099343d36a2c0b206f8c2450df (diff)
downloadop-kernel-dev-15744090c5ad3ed404a541bdec6f4f9ae1996fc9.zip
op-kernel-dev-15744090c5ad3ed404a541bdec6f4f9ae1996fc9.tar.gz
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/adc')
-rw-r--r--drivers/staging/iio/adc/max1363_ring.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/iio/adc/max1363_ring.c b/drivers/staging/iio/adc/max1363_ring.c
index b30d680..60f0a44 100644
--- a/drivers/staging/iio/adc/max1363_ring.c
+++ b/drivers/staging/iio/adc/max1363_ring.c
@@ -223,14 +223,9 @@ int max1363_register_ring_funcs_and_init(struct iio_dev *indio_dev)
}
/* Effectively select the ring buffer implementation */
iio_ring_sw_register_funcs(&st->indio_dev->ring->access);
- indio_dev->pollfunc = kzalloc(sizeof(*indio_dev->pollfunc), GFP_KERNEL);
- if (indio_dev->pollfunc == NULL) {
- ret = -ENOMEM;
+ ret = iio_alloc_pollfunc(indio_dev, NULL, &max1363_poll_func_th);
+ if (ret)
goto error_deallocate_sw_rb;
- }
- /* Configure the polling function called on trigger interrupts */
- indio_dev->pollfunc->poll_func_main = &max1363_poll_func_th;
- indio_dev->pollfunc->private_data = indio_dev;
/* Ring buffer functions - here trigger setup related */
indio_dev->ring->postenable = &max1363_ring_postenable;
OpenPOWER on IntegriCloud