summaryrefslogtreecommitdiff
path: root/drivers/vfio/mdev/mdev_private.h
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2016-12-30 18:13:41 +0300
committerAlex Williamson <alex.williamson@redhat.com>2016-12-30 18:13:41 +0300
commit9372e6feaafb65d88f667ffb5b7b425f8568344f (patch)
tree2fa165cb84cc92d297d283f4fe171b045dcbeb61 /drivers/vfio/mdev/mdev_private.h
parent42930553a7c11f06351bc08b889808d0f6020f08 (diff)
downloadlinux-9372e6feaafb65d88f667ffb5b7b425f8568344f.tar.xz
vfio-mdev: Make mdev_parent private
Rather than hoping for good behavior by marking some elements internal, enforce it by making the entire structure private and creating an accessor function for the one useful external field. Cc: Zhenyu Wang <zhenyuw@linux.intel.com> Cc: Zhi Wang <zhi.a.wang@intel.com> Cc: Jike Song <jike.song@intel.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Reviewed by: Kirti Wankhede <kwankhede@nvidia.com>
Diffstat (limited to 'drivers/vfio/mdev/mdev_private.h')
-rw-r--r--drivers/vfio/mdev/mdev_private.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/vfio/mdev/mdev_private.h b/drivers/vfio/mdev/mdev_private.h
index 0b72c2d9ee40..b05dd22fc9a6 100644
--- a/drivers/vfio/mdev/mdev_private.h
+++ b/drivers/vfio/mdev/mdev_private.h
@@ -16,6 +16,16 @@
int mdev_bus_register(void);
void mdev_bus_unregister(void);
+struct mdev_parent {
+ struct device *dev;
+ const struct mdev_parent_ops *ops;
+ struct kref ref;
+ struct mutex lock;
+ struct list_head next;
+ struct kset *mdev_types_kset;
+ struct list_head type_list;
+};
+
struct mdev_type {
struct kobject kobj;
struct kobject *devices_kobj;