bus/fsl-mc: Export IRQ pool handling functions to be used by VFIO
[platform/kernel/linux-starfive.git] / drivers / bus / fsl-mc / dprc-driver.c
index 9e40882..91dc015 100644 (file)
@@ -327,8 +327,8 @@ static int dprc_scan_objects(struct fsl_mc_device *mc_bus_dev,
                }
 
                if (alloc_interrupts && !mc_bus->irq_resources) {
-                       error = fsl_mc_populate_irq_pool(mc_bus,
-                               FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS);
+                       error = fsl_mc_populate_irq_pool(mc_bus_dev,
+                                        FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS);
                        if (error < 0)
                                return error;
                }
@@ -766,8 +766,6 @@ static void dprc_teardown_irq(struct fsl_mc_device *mc_dev)
 int dprc_cleanup(struct fsl_mc_device *mc_dev)
 {
        int error;
-       struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_dev);
-
 
        /* this function should be called only for DPRCs, it
         * is an error to call it for regular objects
@@ -776,7 +774,7 @@ int dprc_cleanup(struct fsl_mc_device *mc_dev)
                return -EINVAL;
 
        if (dev_get_msi_domain(&mc_dev->dev)) {
-               fsl_mc_cleanup_irq_pool(mc_bus);
+               fsl_mc_cleanup_irq_pool(mc_dev);
                dev_set_msi_domain(&mc_dev->dev, NULL);
        }