diff options
author | Eric Auger <eric.auger@linaro.org> | 2015-11-03 18:12:12 +0000 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2015-11-03 12:54:56 -0700 |
commit | 32a2d71c4e808b5aa6c414d4422b5e6c594c8805 (patch) | |
tree | 2caaf12628259257867f853f9e0d3c92c51217ad /drivers/vfio/platform/vfio_amba.c | |
parent | 1b4bb2eaa9b2583521611b4aa978f9f499c92cd4 (diff) | |
download | lwn-32a2d71c4e808b5aa6c414d4422b5e6c594c8805.tar.gz lwn-32a2d71c4e808b5aa6c414d4422b5e6c594c8805.zip |
vfio: platform: introduce vfio-platform-base module
To prepare for vfio platform reset rework let's build
vfio_platform_common.c and vfio_platform_irq.c in a separate
module from vfio-platform and vfio-amba. This makes possible
to have separate module inits and works around a race between
platform driver init and vfio reset module init: that way we
make sure symbols exported by base are available when vfio-platform
driver gets probed.
The open/release being implemented in the base module, the ref
count is applied to the parent module instead.
Signed-off-by: Eric Auger <eric.auger@linaro.org>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/platform/vfio_amba.c')
-rw-r--r-- | drivers/vfio/platform/vfio_amba.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vfio/platform/vfio_amba.c b/drivers/vfio/platform/vfio_amba.c index ff0331f72526..a66479bd0edf 100644 --- a/drivers/vfio/platform/vfio_amba.c +++ b/drivers/vfio/platform/vfio_amba.c @@ -67,6 +67,7 @@ static int vfio_amba_probe(struct amba_device *adev, const struct amba_id *id) vdev->flags = VFIO_DEVICE_FLAGS_AMBA; vdev->get_resource = get_amba_resource; vdev->get_irq = get_amba_irq; + vdev->parent_module = THIS_MODULE; ret = vfio_platform_probe_common(vdev, &adev->dev); if (ret) { |