linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rts5208: rtsx: Replace depracated MSI API
@ 2020-07-18 13:18 Suraj Upadhyay
  2020-07-18 15:28 ` Suraj Upadhyay
  0 siblings, 1 reply; 2+ messages in thread
From: Suraj Upadhyay @ 2020-07-18 13:18 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

Replace depracated pci_enable_msi with pci_alloc_irq_vectors.

Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
---
 drivers/staging/rts5208/rtsx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c
index e28e162d004e..adc80e766412 100644
--- a/drivers/staging/rts5208/rtsx.c
+++ b/drivers/staging/rts5208/rtsx.c
@@ -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(dev, 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(dev, 1, 1, PCI_IRQ_MSI) < 0)
 			dev->chip->msi_en = 0;
 	}
 
-- 
2.17.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: rts5208: rtsx: Replace depracated MSI API
  2020-07-18 13:18 [PATCH] staging: rts5208: rtsx: Replace depracated MSI API Suraj Upadhyay
@ 2020-07-18 15:28 ` Suraj Upadhyay
  0 siblings, 0 replies; 2+ messages in thread
From: Suraj Upadhyay @ 2020-07-18 15:28 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, kernel-janitors

On Sat, Jul 18, 2020 at 06:48:56PM +0530, Suraj Upadhyay wrote:
> Replace depracated pci_enable_msi with pci_alloc_irq_vectors.
> 
> Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
> ---
>  drivers/staging/rts5208/rtsx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c
> index e28e162d004e..adc80e766412 100644
> --- a/drivers/staging/rts5208/rtsx.c
> +++ b/drivers/staging/rts5208/rtsx.c
> @@ -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(dev, 1, 1, PCI_IRQ_MSI) < 0)
The conversion is buggy, It changes variable name.

>  			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(dev, 1, 1, PCI_IRQ_MSI) < 0)

This has the same mistake.

>  			dev->chip->msi_en = 0;
>  	}
>  
> -- 
> 2.17.1
> 

Resending this patch.
I hope this wasn't an annoyance.

Thanks,

Suraj Upadhyay



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-18 15:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-18 13:18 [PATCH] staging: rts5208: rtsx: Replace depracated MSI API Suraj Upadhyay
2020-07-18 15:28 ` Suraj Upadhyay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).