vfio/platform: Use the new device life cycle helpers
authorKevin Tian <kevin.tian@intel.com>
Wed, 21 Sep 2022 10:43:57 +0000 (18:43 +0800)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 21 Sep 2022 20:15:11 +0000 (14:15 -0600)
commit5f6c7e0831a1f1faffad43bb8dbc260b49f2d3dc
treee31787c49009f4e3a1d545f990f031cc850c21f9
parent7566692c571dced7208b7cc26c1d3b898a233487
vfio/platform: Use the new device life cycle helpers

Move vfio_device_ops from platform core to platform drivers so device
specific init/cleanup can be added.

Introduce two new helpers vfio_platform_init/release_common() for the
use in driver @init/@release.

vfio_platform_probe/remove_common() will be deprecated.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20220921104401.38898-12-kevin.tian@intel.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/platform/vfio_platform.c
drivers/vfio/platform/vfio_platform_common.c
drivers/vfio/platform/vfio_platform_private.h