mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
vfio/mdev: Use struct mdev_type in struct mdev_device
The kobj pointer in mdev_device is actually pointing at a struct mdev_type. Use the proper type so things are understandable. There are a number of places that are confused and passing both the mdev and the mtype as function arguments, fix these to derive the mtype directly from the mdev to remove the redundancy. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Message-Id: <5-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
91b9969d9c
commit
417fd5bf24
4 changed files with 18 additions and 20 deletions
|
@ -10,13 +10,15 @@
|
|||
#ifndef MDEV_H
|
||||
#define MDEV_H
|
||||
|
||||
struct mdev_type;
|
||||
|
||||
struct mdev_device {
|
||||
struct device dev;
|
||||
struct mdev_parent *parent;
|
||||
guid_t uuid;
|
||||
void *driver_data;
|
||||
struct list_head next;
|
||||
struct kobject *type_kobj;
|
||||
struct mdev_type *type;
|
||||
struct device *iommu_device;
|
||||
bool active;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue