aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2021-12-10 23:19:01 +0100
committerThomas Gleixner <tglx@linutronix.de>2021-12-16 22:16:39 +0100
commit686073e9f8466de259971f1acd81b19a39e2162b (patch)
tree83dd4eb9cd10add1298e9614eb32fcdc58aee2b4
parentbus: fsl-mc-msi: Allocate MSI device data on first use (diff)
downloadlinux-dev-686073e9f8466de259971f1acd81b19a39e2162b.tar.xz
linux-dev-686073e9f8466de259971f1acd81b19a39e2162b.zip
soc: ti: ti_sci_inta_msi: Allocate MSI device data on first use
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
-rw-r--r--drivers/soc/ti/ti_sci_inta_msi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/soc/ti/ti_sci_inta_msi.c b/drivers/soc/ti/ti_sci_inta_msi.c
index 428a482df0f2..a89bcbcd4694 100644
--- a/drivers/soc/ti/ti_sci_inta_msi.c
+++ b/drivers/soc/ti/ti_sci_inta_msi.c
@@ -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;