diff options
author | Diana Craciun <diana.craciun@oss.nxp.com> | 2020-09-29 11:54:39 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-02 16:05:02 +0200 |
commit | 0dadd95216d56cec01cef066eebe6354f069ff34 (patch) | |
tree | be174bb5291d065e16fe7cd3c61f183ba803c8f9 /drivers/bus/fsl-mc/dprc-driver.c | |
parent | 5026cf605143e764e1785bbf9158559d17f8d260 (diff) |
bus/fsl-mc: Export IRQ pool handling functions to be used by VFIO
The IRQ pool handling functions can be used by both DPRC
driver and VFIO. Adapt and export those functions.
Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Acked-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Diana Craciun <diana.craciun@oss.nxp.com>
Link: https://lore.kernel.org/r/20200929085441.17448-12-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/bus/fsl-mc/dprc-driver.c')
-rw-r--r-- | drivers/bus/fsl-mc/dprc-driver.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/bus/fsl-mc/dprc-driver.c b/drivers/bus/fsl-mc/dprc-driver.c index 9e4088209cfe..91dc015963a8 100644 --- a/drivers/bus/fsl-mc/dprc-driver.c +++ b/drivers/bus/fsl-mc/dprc-driver.c @@ -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); } |