aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/b2c2
diff options
context:
space:
mode:
authorHendrik Borghorst <hendrik@borghorst.org>2007-04-05 13:28:11 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:45:29 -0400
commit4f210e072235c3c123b068d348a1a02e624ff5be (patch)
tree138d30ebc9aec486cff1f35804dd85d19ba6fbe8 /drivers/media/dvb/b2c2
parent990e3743b505a0bb08c04a381d5477e19d31ef5e (diff)
V4L/DVB (5505): Fix Kernel Bugzilla #8301: spinlock fix for flexcop-pci
If you modprobe the b2c2-flexcop-pci module you got a hardlock of your system. This is due the usage of spin_lock before spin_lock_init is called. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/b2c2')
-rw-r--r--drivers/media/dvb/b2c2/flexcop-pci.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-pci.c b/drivers/media/dvb/b2c2/flexcop-pci.c
index 6e166801505d..01af4d237eb1 100644
--- a/drivers/media/dvb/b2c2/flexcop-pci.c
+++ b/drivers/media/dvb/b2c2/flexcop-pci.c
@@ -127,10 +127,11 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id)
127{ 127{
128 struct flexcop_pci *fc_pci = dev_id; 128 struct flexcop_pci *fc_pci = dev_id;
129 struct flexcop_device *fc = fc_pci->fc_dev; 129 struct flexcop_device *fc = fc_pci->fc_dev;
130 unsigned long flags;
130 flexcop_ibi_value v; 131 flexcop_ibi_value v;
131 irqreturn_t ret = IRQ_HANDLED; 132 irqreturn_t ret = IRQ_HANDLED;
132 133
133 spin_lock_irq(&fc_pci->irq_lock); 134 spin_lock_irqsave(&fc_pci->irq_lock,flags);
134 135
135 v = fc->read_ibi_reg(fc,irq_20c); 136 v = fc->read_ibi_reg(fc,irq_20c);
136 137
@@ -194,7 +195,7 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id)
194 ret = IRQ_NONE; 195 ret = IRQ_NONE;
195 } 196 }
196 197
197 spin_unlock_irq(&fc_pci->irq_lock); 198 spin_unlock_irqrestore(&fc_pci->irq_lock,flags);
198 199
199 return ret; 200 return ret;
200} 201}
@@ -293,12 +294,12 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci)
293 } 294 }
294 295
295 pci_set_drvdata(fc_pci->pdev, fc_pci); 296 pci_set_drvdata(fc_pci->pdev, fc_pci);
296 297 spin_lock_init(&fc_pci->irq_lock);
297 if ((ret = request_irq(fc_pci->pdev->irq, flexcop_pci_isr, 298 if ((ret = request_irq(fc_pci->pdev->irq, flexcop_pci_isr,
298 IRQF_SHARED, DRIVER_NAME, fc_pci)) != 0) 299 IRQF_SHARED, DRIVER_NAME, fc_pci)) != 0)
299 goto err_pci_iounmap; 300 goto err_pci_iounmap;
300 301
301 spin_lock_init(&fc_pci->irq_lock); 302
302 303
303 fc_pci->init_state |= FC_PCI_INIT; 304 fc_pci->init_state |= FC_PCI_INIT;
304 return ret; 305 return ret;