vfio/mtty: Convert to use vfio_register_group_dev()
authorJason Gunthorpe <jgg@nvidia.com>
Thu, 17 Jun 2021 14:22:16 +0000 (16:22 +0200)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 21 Jun 2021 21:29:25 +0000 (15:29 -0600)
commit09177ac9192198bec24a81c822ebeef4197c3c8b
treeea39a96de5d46e78ba51880496f8351605e1a624
parent88a21f265ce50a17e6e71e3fb4467625cf234c5a
vfio/mtty: Convert to use vfio_register_group_dev()

This is straightforward conversion, the mdev_state is actually serving as
the vfio_device and we can replace all the mdev_get_drvdata()'s and the
wonky dead code with a simple container_of()

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com>
Link: https://lore.kernel.org/r/20210617142218.1877096-9-hch@lst.de
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
samples/vfio-mdev/mtty.c