bus/fsl-mc: Export dprc_scan/dprc_remove functions to be used by multiple entities
authorDiana Craciun <diana.craciun@oss.nxp.com>
Tue, 29 Sep 2020 08:54:35 +0000 (11:54 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Oct 2020 14:05:01 +0000 (16:05 +0200)
commit5d781fabe64244ccf8a954617ea8b28737517b1c
tree2d3e54188c8a9397f4d1b0f0067dfebfa0163091
parent715b02ce8968bd560d295945520bae6d73707a73
bus/fsl-mc: Export dprc_scan/dprc_remove functions to be used by multiple entities

Currently the DPRC scan function is used only by the bus driver.
But the same functionality will be needed by the VFIO driver.
To support this, the dprc scan function was exported and a little
bit adjusted to fit both scenarios. Also the scan mutex initialization
is done when the bus object is created, not in dprc_probe in order
to be used by both VFIO and bus driver.
Similarily dprc_remove_devices is exported to be used by VFIO.

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-8-diana.craciun@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/fsl-mc/dprc-driver.c
drivers/bus/fsl-mc/fsl-mc-bus.c
include/linux/fsl/mc.h