iio: adc: bcm_iproc_adc: swap primary and secondary isr handler's
authorRaveendra Padasalagi <raveendra.padasalagi@broadcom.com>
Tue, 16 May 2017 06:52:42 +0000 (12:22 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2017 13:05:59 +0000 (15:05 +0200)
commite33679f994db7bf17535fd0179db3dca26ca8bda
tree52d7bef51391206d778f1e31abaacd61241e6eab
parentc5a8004434f0fba8010c38129e82964dd06d06b2
iio: adc: bcm_iproc_adc: swap primary and secondary isr handler's

commit f7d86ecf83cb66d3c4c6ac4edb1dd50c0919aa2b upstream.

The third argument of devm_request_threaded_irq() is the primary
handler. It is called in hardirq context and checks whether the
interrupt is relevant to the device. If the primary handler returns
IRQ_WAKE_THREAD, the secondary handler (a.k.a. handler thread) is
scheduled to run in process context.

bcm_iproc_adc.c uses the secondary handler as the primary one
and the other way around. So this patch fixes the same, along with
re-naming the secondary handler and primary handler names properly.

Tested on the BCM9583XX iProc SoC based boards.

Fixes: 4324c97ecedc ("iio: Add driver for Broadcom iproc-static-adc")
Reported-by: Pavel Roskin <plroskin@gmail.com>
Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/bcm_iproc_adc.c