[PATCH] mfd: ezx-pcap: avoid calling mutex_lock() in irq handler

From: Alexey Khoroshilov
Date: Sat Apr 05 2014 - 16:56:13 EST


pcap_adc_irq() calls mutex_lock(), while it is registered
as nonthreaded irq handler.

The patch makes a switch to threaded irq handling.
Compile tested only.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@xxxxxxxxx>
---
drivers/mfd/ezx-pcap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index 2ed774e7d342..b27830035e36 100644
--- a/drivers/mfd/ezx-pcap.c
+++ b/drivers/mfd/ezx-pcap.c
@@ -485,8 +485,8 @@ static int ezx_pcap_probe(struct spi_device *spi)
adc_irq = pcap_to_irq(pcap, (pdata->config & PCAP_SECOND_PORT) ?
PCAP_IRQ_ADCDONE2 : PCAP_IRQ_ADCDONE);

- ret = devm_request_irq(&spi->dev, adc_irq, pcap_adc_irq, 0, "ADC",
- pcap);
+ ret = devm_request_threaded_irq(&spi->dev, adc_irq, NULL,
+ pcap_adc_irq, 0, "ADC", pcap);
if (ret)
goto free_irqchip;

--
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/