Skip to contentSkip to conversation

staging: rts5208: rtsx: 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: rts5208: rtsx: Replace depracated MSI API

Replace depracated pci_enable_msi with pci_alloc_irq_vectors.

---
 drivers/staging/rts5208/rtsx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rts5208/rtsx.c +2 -2
index e28e162d004e..b39d3f8b54df 100644
@@ -310,7 +310,7 @@ static int __maybe_unused rtsx_resume(struct device *dev_d)
 	pci_set_master(pci);
 
 	if (chip->msi_en) {
-		if (pci_enable_msi(pci) < 0)
+		if (pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI) < 0)
 			chip->msi_en = 0;
 	}
 
@@ -881,7 +881,7 @@ static int rtsx_probe(struct pci_dev *pci,
 	dev_info(&pci->dev, "pci->irq = %d\n", pci->irq);
 
 	if (dev->chip->msi_en) {
-		if (pci_enable_msi(pci) < 0)
+		if (pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI) < 0)
 			dev->chip->msi_en = 0;
 	}
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 7 lines · Suraj Upadhyay

Replace depracated pci_enable_msi with pci_alloc_irq_vectors.

---
 drivers/staging/rts5208/rtsx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Hii, don't merge this patch.
It is still incomplete.
It doesn't replace pci_disable_msi. I hope this didn't cause any annoyances.

Thanks,

Suraj Upadhyay.

Quoted 25 lines
drivers/staging/rts5208/rtsx.c +2 -2
index e28e162d004e..b39d3f8b54df 100644
@@ -310,7 +310,7 @@ static int __maybe_unused rtsx_resume(struct device *dev_d)
 	pci_set_master(pci);
 
 	if (chip->msi_en) {
-		if (pci_enable_msi(pci) < 0)
+		if (pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI) < 0)
 			chip->msi_en = 0;
 	}
 
@@ -881,7 +881,7 @@ static int rtsx_probe(struct pci_dev *pci,
 	dev_info(&pci->dev, "pci->irq = %d\n", pci->irq);
 
 	if (dev->chip->msi_en) {
-		if (pci_enable_msi(pci) < 0)
+		if (pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI) < 0)
 			dev->chip->msi_en = 0;
 	}
 
Signature · 1 line
2.17.1