[PATCH 4/9] ltdrv: Remove incorrect use of IRQF_DISABLED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This tried to use IRQF_DISABLED and IRQF_SHARED at the same time,
but if you do this, the kernel will point out that you won't
get a guarantee that IRQF_DISABLED semantics will actually
happen when you've also specified IRQF_SHARED. So instead we
remove the IRQF_DISABLED and wrap the "black box" DSP IRQ
handler in local_irq_disable()/local_irq_enable().

Signed-off-by: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
---
 ltdrv.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/ltdrv.c b/ltdrv.c
index 23c2cd6..20ca240 100644
--- a/ltdrv.c
+++ b/ltdrv.c
@@ -95,13 +95,14 @@ static unsigned int init_vport(struct _ltmodem *ltdev)
 static irqreturn_t ltmodem_isr(int irq, void *_dev)
 {
 	struct _ltmodem *dev = (struct _ltmodem *)_dev;
-	int handled = 1;
 
 	spin_lock (&dev->lock);
+	local_irq_disable();
 	dp_dsp_isr();
+	local_irq_enable();
 	spin_unlock (&dev->lock);
 
-	return IRQ_RETVAL(handled);
+	return IRQ_HANDLED;
 }
 
 asmlinkage u8 dp_regread(u8 reg)
@@ -222,7 +223,7 @@ struct _ltmodem *ltmodem_add (struct martian_metrics *metrics, int *error)
 	ret = request_irq(
 		dev->irq, 
 		ltmodem_isr,  
-		IRQF_DISABLED | IRQF_SHARED, 
+		IRQF_SHARED,
 		"ltmodem", 
 		dev
 	);
-- 
1.6.5.2


[Index of Archives]     [Linux Media Development]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Xfree86]     [Fedora Women]     [Linux USB]

  Powered by Linux