Skip to contentSkip to conversation

staging: kpc2000: Replace depracated MSI API.

PATCH Superseded Suraj Upadhyay 1 participant 2 messages Jul 18, 2020 – Jul 19, 2020 Staging

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: kpc2000: Replace depracated MSI API.

Replace depracated pci_enable_msi with pci_alloc_irq_vectors. And as a result modify how the returned value is handled.

---
Changes:
v2: Removed the undefined variable.
Reported by kernel-bot.

 drivers/staging/kpc2000/kpc2000/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/kpc2000/kpc2000/core.c +1 -1
index 358d7b2f4ad1..8339026ffb41 100644
@@ -440,7 +440,7 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 	dev_dbg(&pcard->pdev->dev,
 		"Using DMA mask %0llx\n", dma_get_mask(PCARD_TO_DEV(pcard)));
 
-	err = pci_enable_msi(pcard->pdev);
+	err = pci_alloc_irq_vectors(pcard->pdev, 1, 1, PCI_IRQ_MSI);
 	if (err < 0)
 		goto err_release_dma;
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 9 lines · Suraj Upadhyay

Replace depracated pci_enable_msi with pci_alloc_irq_vectors. And as a result modify how the returned value is handled.

---
Changes:
v2: Removed the undefined variable.
Reported by kernel-bot.

Don't merge it.
This patch is incomplete.
I have to replce pci_disable_msi too.
I hope this didn't cause any annoyances.

Thanks,

Suraj Upadhyay.

Quoted 19 lines
 drivers/staging/kpc2000/kpc2000/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/kpc2000/kpc2000/core.c +1 -1
index 358d7b2f4ad1..8339026ffb41 100644
@@ -440,7 +440,7 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 	dev_dbg(&pcard->pdev->dev,
 		"Using DMA mask %0llx\n", dma_get_mask(PCARD_TO_DEV(pcard)));
 
-	err = pci_enable_msi(pcard->pdev);
+	err = pci_alloc_irq_vectors(pcard->pdev, 1, 1, PCI_IRQ_MSI);
 	if (err < 0)
 		goto err_release_dma;
 
Signature · 1 line
2.17.1