vfio/fsl-mc: Use vfio_init/register/unregister_group_dev
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 30 Mar 2021 15:53:06 +0000 (09:53 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 6 Apr 2021 17:55:10 +0000 (11:55 -0600)
commit0ca78666fa06cf2a7d068a593428dc4039706e00
tree481c2800facae51354cdbed2fd23dfb6933de0d4
parent2b1fe162e584a88ec7f12a651a2a50f94dd8cfac
vfio/fsl-mc: Use vfio_init/register/unregister_group_dev

fsl-mc already allocates a struct vfio_fsl_mc_device with exactly the same
lifetime as vfio_device, switch to the new API and embed vfio_device in
vfio_fsl_mc_device. While here remove the devm usage for the vdev, this
code is clean and doesn't need devm.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Message-Id: <6-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/fsl-mc/vfio_fsl_mc.c
drivers/vfio/fsl-mc/vfio_fsl_mc_private.h