lkml.org 
[lkml]   [2020]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: media: ipu3: Replace depracated MSI API.
Hi Suraj,

Thanks for the patch.

On Sat, Jul 18, 2020 at 07:02:38PM +0530, Suraj Upadhyay wrote:
> 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 <usuraj35@gmail.com>
> ---
> drivers/staging/media/ipu3/ipu3.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/media/ipu3/ipu3.c b/drivers/staging/media/ipu3/ipu3.c
> index ee1bba6bdcac..54690e7442be 100644
> --- a/drivers/staging/media/ipu3/ipu3.c
> +++ b/drivers/staging/media/ipu3/ipu3.c
> @@ -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;
> }

I believe fixing this requires also releasing it, i.e. a call to
pci_free_irq_vectors(). This seems to have been missing.

--
Kind regards,

Sakari Ailus

\
 
 \ /
  Last update: 2020-08-13 23:41    [W:0.429 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site