staging: media: ipu3: Replace depracated MSI API.
Subsystems (4)
PATCH 1/1 staging: media: ipu3: Replace depracated MSI API.
Replace depracated psi_enable_msi with pci_alloc_irq_vectors. And as a result modify how the returned value is handled.
Signed-off-by Suraj Upadhyay <[email protected]>
--- drivers/staging/media/ipu3/ipu3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/ipu3/ipu3.c +2 -2
@@ -602,9 +602,9 @@ static irqreturn_t imgu_isr(int irq, void *imgu_ptr)static int imgu_pci_config_setup (struct pci_dev *dev) {u16 pci_command; -int r =pci_enable_msi (dev); +int r =pci_alloc_irq_vectors (dev,1 ,1 ,PCI_IRQ_MSI ); -if (r) { +if (r <0 ) {dev_err (&dev->dev,"failed to enable MSI (%d)\n" , r);return r; }
Signature · 1 line
2.17.1
Upadhyay,
Thanks for your patch. Please correct the typo in message.
Quoted 25 lines · Suraj Upadhyay
Replace depracated
psi_enable_msiwithpci_alloc_irq_vectors. And as a result modify how the returned value is handled.Signed-off-by Suraj Upadhyay <[email protected]>--- drivers/staging/media/ipu3/ipu3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/media/ipu3/ipu3.c +2
-2@@ -602,9 +602,9 @@ static irqreturn_t imgu_isr(int irq, void *imgu_ptr)static int imgu_pci_config_setup (struct pci_dev *dev) {u16 pci_command; -int r =pci_enable_msi (dev); +int r =pci_alloc_irq_vectors (dev,1 ,1 ,PCI_IRQ_MSI ); -if (r) { +if (r <0 ) {dev_err (&dev->dev,"failed to enable MSI (%d)\n" , r);return r; }
Signature · 2 lines
Best regards, Bingbu Cao
Sakari Ailus
maintainerHi Suraj,
Thanks for the patch.
Quoted 14 lines · Suraj Upadhyay
Replace depracated
psi_enable_msiwithpci_alloc_irq_vectors. And as a result modify how the returned value is handled.Signed-off-by Suraj Upadhyay <[email protected]>--- drivers/staging/media/ipu3/ipu3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/media/ipu3/ipu3.c +0
-0@@ -602,9 +602,9 @@ static irqreturn_t imgu_isr(int irq, void *imgu_ptr)static int imgu_pci_config_setup (struct pci_dev *dev)
drivers/staging/media/ipu3/ipu3.c static irqreturn_t imgu_isr(int irq, void *imgu_ptr) · line 610
Quoted 10 lines
drivers/staging/media/ipu3/ipu3.c +2
-2{u16 pci_command; -int r =pci_enable_msi (dev); +int r =pci_alloc_irq_vectors (dev,1 ,1 ,PCI_IRQ_MSI ); -if (r) { +if (r <0 ) {dev_err (&dev->dev,"failed to enable MSI (%d)\n" , r);return r; }
I believe fixing this requires also releasing it, i.e. a call to pci_free_irq_vectors(). This seems to have been missing.
Signature · 3 lines
Kind regards, Sakari Ailus