Christoph Hellwig da44c340c4 vfio/mdev: simplify mdev_type handling
Instead of abusing struct attribute_group to control initialization of
struct mdev_type, just define the actual attributes in the mdev_driver,
allocate the mdev_type structures in the caller and pass them to
mdev_register_parent.

This allows the caller to use container_of to get at the containing
structure and thus significantly simplify the code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Tony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Link: https://lore.kernel.org/r/20220923092652.100656-6-hch@lst.de
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2022-10-04 12:06:58 -06:00
..
2022-08-04 12:12:54 -07:00
2022-09-02 09:31:15 -06:00
2022-08-07 17:52:35 -07:00
2022-09-03 13:09:46 -07:00
2022-08-04 15:35:58 -07:00
2022-08-08 11:18:31 -07:00
2022-08-11 23:25:05 +02:00
2022-08-06 10:19:51 -07:00
2022-08-04 19:47:37 -07:00
2022-07-11 15:51:01 +01:00
2022-08-10 11:43:59 -04:00
2022-08-05 09:41:12 -07:00
2022-08-04 19:47:37 -07:00
2022-08-06 10:56:45 -07:00