diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2010-07-11 16:39:10 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-22 11:38:28 -0700 |
commit | c3db00cc80cf01f9a2033c3f3eb03345d0024761 (patch) | |
tree | cead6de24daaea7fe892461312bfe99040d77c75 /drivers/staging/iio/imu/adis16400_ring.c | |
parent | 15744090c5ad3ed404a541bdec6f4f9ae1996fc9 (diff) |
staging: iio: Add iio_triggered_ring postenable and predisable + use in drivers
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/imu/adis16400_ring.c')
-rw-r--r-- | drivers/staging/iio/imu/adis16400_ring.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/staging/iio/imu/adis16400_ring.c b/drivers/staging/iio/imu/adis16400_ring.c index da24384ffd97..8f7d257e4344 100644 --- a/drivers/staging/iio/imu/adis16400_ring.c +++ b/drivers/staging/iio/imu/adis16400_ring.c @@ -209,22 +209,6 @@ static int adis16400_data_rdy_ring_preenable(struct iio_dev *indio_dev) return 0; } -static int adis16400_data_rdy_ring_postenable(struct iio_dev *indio_dev) -{ - return indio_dev->trig - ? iio_trigger_attach_poll_func(indio_dev->trig, - indio_dev->pollfunc) - : 0; -} - -static int adis16400_data_rdy_ring_predisable(struct iio_dev *indio_dev) -{ - return indio_dev->trig - ? iio_trigger_dettach_poll_func(indio_dev->trig, - indio_dev->pollfunc) - : 0; -} - void adis16400_unconfigure_ring(struct iio_dev *indio_dev) { kfree(indio_dev->pollfunc); @@ -264,8 +248,8 @@ int adis16400_configure_ring(struct iio_dev *indio_dev) /* Effectively select the ring buffer implementation */ iio_ring_sw_register_funcs(&ring->access); ring->preenable = &adis16400_data_rdy_ring_preenable; - ring->postenable = &adis16400_data_rdy_ring_postenable; - ring->predisable = &adis16400_data_rdy_ring_predisable; + ring->postenable = &iio_triggered_ring_postenable; + ring->predisable = &iio_triggered_ring_predisable; ring->owner = THIS_MODULE; ret = iio_alloc_pollfunc(indio_dev, NULL, &adis16400_poll_func_th); |