From: Jonathan Cameron Date: Wed, 18 May 2011 13:41:20 +0000 (+0100) Subject: staging:iio:ring_sw add function needed for threaded irq. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e0580032658c3b9c4e1ffca3a60a5c865a44cb36;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging:iio:ring_sw add function needed for threaded irq. Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/ring_sw.c b/drivers/staging/iio/ring_sw.c index 40beadd604da..d55757bb5fd9 100644 --- a/drivers/staging/iio/ring_sw.c +++ b/drivers/staging/iio/ring_sw.c @@ -455,11 +455,8 @@ int iio_sw_ring_preenable(struct iio_dev *indio_dev) } EXPORT_SYMBOL(iio_sw_ring_preenable); -void iio_sw_trigger_bh_to_ring(struct work_struct *work_s) +void iio_sw_trigger_to_ring(struct iio_sw_ring_helper_state *st) { - struct iio_sw_ring_helper_state *st - = container_of(work_s, struct iio_sw_ring_helper_state, - work_trigger_to_ring); struct iio_ring_buffer *ring = st->indio_dev->ring; int len = 0; size_t datasize = ring->access.get_bytes_per_datum(ring); @@ -488,6 +485,15 @@ void iio_sw_trigger_bh_to_ring(struct work_struct *work_s) return; } +EXPORT_SYMBOL(iio_sw_trigger_to_ring); + +void iio_sw_trigger_bh_to_ring(struct work_struct *work_s) +{ + struct iio_sw_ring_helper_state *st + = container_of(work_s, struct iio_sw_ring_helper_state, + work_trigger_to_ring); + iio_sw_trigger_to_ring(st); +} EXPORT_SYMBOL(iio_sw_trigger_bh_to_ring); void iio_sw_poll_func_th(struct iio_dev *indio_dev, s64 time) diff --git a/drivers/staging/iio/ring_sw.h b/drivers/staging/iio/ring_sw.h index 7d565240531f..84b7c5a83214 100644 --- a/drivers/staging/iio/ring_sw.h +++ b/drivers/staging/iio/ring_sw.h @@ -216,6 +216,7 @@ struct iio_sw_ring_helper_state { void iio_sw_poll_func_th(struct iio_dev *indio_dev, s64 time); void iio_sw_trigger_bh_to_ring(struct work_struct *work_s); +void iio_sw_trigger_to_ring(struct iio_sw_ring_helper_state *st); #else /* CONFIG_IIO_RING_BUFFER*/ struct iio_sw_ring_helper_state {