aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/msi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/msi.c')
-rw-r--r--drivers/pci/msi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 202b7507a357..8e1ba0b7a8e4 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -416,7 +416,9 @@ static void attach_msi_entry(struct msi_desc *entry, int vector)
416 416
417static void irq_handler_init(int cap_id, int pos, int mask) 417static void irq_handler_init(int cap_id, int pos, int mask)
418{ 418{
419 spin_lock(&irq_desc[pos].lock); 419 unsigned long flags;
420
421 spin_lock_irqsave(&irq_desc[pos].lock, flags);
420 if (cap_id == PCI_CAP_ID_MSIX) 422 if (cap_id == PCI_CAP_ID_MSIX)
421 irq_desc[pos].handler = &msix_irq_type; 423 irq_desc[pos].handler = &msix_irq_type;
422 else { 424 else {
@@ -425,7 +427,7 @@ static void irq_handler_init(int cap_id, int pos, int mask)
425 else 427 else
426 irq_desc[pos].handler = &msi_irq_w_maskbit_type; 428 irq_desc[pos].handler = &msi_irq_w_maskbit_type;
427 } 429 }
428 spin_unlock(&irq_desc[pos].lock); 430 spin_unlock_irqrestore(&irq_desc[pos].lock, flags);
429} 431}
430 432
431static void enable_msi_mode(struct pci_dev *dev, int pos, int type) 433static void enable_msi_mode(struct pci_dev *dev, int pos, int type)