diff options
author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-06-09 11:23:06 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-06-09 11:23:06 -0700 |
commit | cf5d29992cc6248df08f0951ef0171bff1f5a25b (patch) | |
tree | 53975dce25d4b7e684c1e4c9358d2fb23195add3 | |
parent | a72ca7d8c8574eda373f23509826d5cf3bbfcb54 (diff) | |
parent | df92ddf7ad68fa47e20208a1042b2607f0c0d45d (diff) |
Merge "msm: pcie: do not set irq chip data when using QGIC MSI"
-rw-r--r-- | drivers/pci/host/pci-msm.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/pci/host/pci-msm.c b/drivers/pci/host/pci-msm.c index 2da3988951c5..217c7ce3f57b 100644 --- a/drivers/pci/host/pci-msm.c +++ b/drivers/pci/host/pci-msm.c @@ -5610,16 +5610,18 @@ static void msm_pcie_unmap_qgic_addr(struct msm_pcie_dev_t *dev, } } -void msm_pcie_destroy_irq(unsigned int irq) +void msm_pcie_destroy_irq(unsigned int irq, struct pci_dev *pdev) { int pos; - struct pci_dev *pdev = irq_get_chip_data(irq); struct msi_desc *entry = irq_get_msi_desc(irq); struct msi_desc *firstentry; struct msm_pcie_dev_t *dev; u32 nvec; int firstirq; + if (!pdev) + pdev = irq_get_chip_data(irq); + if (!pdev) { pr_err("PCIe: pci device is null. IRQ:%d\n", irq); return; @@ -5679,7 +5681,7 @@ void msm_pcie_destroy_irq(unsigned int irq) void arch_teardown_msi_irq(unsigned int irq) { PCIE_GEN_DBG("irq %d deallocated\n", irq); - msm_pcie_destroy_irq(irq); + msm_pcie_destroy_irq(irq, NULL); } void arch_teardown_msi_irqs(struct pci_dev *dev) @@ -5698,7 +5700,7 @@ void arch_teardown_msi_irqs(struct pci_dev *dev) continue; nvec = 1 << entry->msi_attrib.multiple; for (i = 0; i < nvec; i++) - arch_teardown_msi_irq(entry->irq + i); + msm_pcie_destroy_irq(entry->irq + i, dev); } } @@ -5894,7 +5896,6 @@ static int arch_setup_msi_irq_qgic(struct pci_dev *pdev, firstirq = irq; irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING); - irq_set_chip_data(irq, pdev); } /* write msi vector and data */ |