]> git.baikalelectronics.ru Git - kernel.git/commitdiff
soc: ti: ti_sci_inta_msi: Allocate MSI device data on first use
authorThomas Gleixner <tglx@linutronix.de>
Fri, 10 Dec 2021 22:19:01 +0000 (23:19 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 16 Dec 2021 21:16:39 +0000 (22:16 +0100)
Allocate the MSI device data on first invocation of the allocation function.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20211210221813.928842960@linutronix.de
drivers/soc/ti/ti_sci_inta_msi.c

index 428a482df0f21c7e052e3496528585eddabeb3f4..a89bcbcd469452f99b8b0adbda4c7b1014ad4ad6 100644 (file)
@@ -120,6 +120,10 @@ int ti_sci_inta_msi_domain_alloc_irqs(struct device *dev,
        if (pdev->id < 0)
                return -ENODEV;
 
+       ret = msi_setup_device_data(dev);
+       if (ret)
+               return ret;
+
        nvec = ti_sci_inta_msi_alloc_descs(dev, res);
        if (nvec <= 0)
                return nvec;