vfio: Move vfio_iommu_group_get() to vfio_register_group_dev()
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 24 Sep 2021 15:56:51 +0000 (17:56 +0200)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 30 Sep 2021 18:46:43 +0000 (12:46 -0600)
commit38a68934aa72459217986cf6b461d87f7602648a
tree70e9c2f21cc898cfc658048cd6a60533579a2653
parent5816b3e6577eaa676ceb00a848f0fd65fe2adc29
vfio: Move vfio_iommu_group_get() to vfio_register_group_dev()

We don't need to hold a reference to the group in the driver as well as
obtain a reference to the same group as the first thing
vfio_register_group_dev() does.

Since the drivers never use the group move this all into the core code.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20210924155705.4258-2-hch@lst.de
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/fsl-mc/vfio_fsl_mc.c
drivers/vfio/pci/vfio_pci_core.c
drivers/vfio/platform/vfio_platform_common.c
drivers/vfio/vfio.c
include/linux/vfio.h