aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mdev.h
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2016-12-30 10:13:41 -0500
committerAlex Williamson <alex.williamson@redhat.com>2016-12-30 10:13:41 -0500
commit9372e6feaafb65d88f667ffb5b7b425f8568344f (patch)
tree2fa165cb84cc92d297d283f4fe171b045dcbeb61 /include/linux/mdev.h
parent42930553a7c11f06351bc08b889808d0f6020f08 (diff)
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 'include/linux/mdev.h')
-rw-r--r--include/linux/mdev.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/include/linux/mdev.h b/include/linux/mdev.h
index 853bb78e5866..f586222b6c25 100644
--- a/include/linux/mdev.h
+++ b/include/linux/mdev.h
@@ -13,19 +13,6 @@
13#ifndef MDEV_H 13#ifndef MDEV_H
14#define MDEV_H 14#define MDEV_H
15 15
16/* Parent device */
17struct mdev_parent {
18 struct device *dev;
19 const struct mdev_parent_ops *ops;
20
21 /* internal */
22 struct kref ref;
23 struct mutex lock;
24 struct list_head next;
25 struct kset *mdev_types_kset;
26 struct list_head type_list;
27};
28
29/* Mediated device */ 16/* Mediated device */
30struct mdev_device { 17struct mdev_device {
31 struct device dev; 18 struct device dev;
@@ -165,4 +152,6 @@ extern void mdev_unregister_device(struct device *dev);
165extern int mdev_register_driver(struct mdev_driver *drv, struct module *owner); 152extern int mdev_register_driver(struct mdev_driver *drv, struct module *owner);
166extern void mdev_unregister_driver(struct mdev_driver *drv); 153extern void mdev_unregister_driver(struct mdev_driver *drv);
167 154
155extern struct device *mdev_parent_dev(struct mdev_device *mdev);
156
168#endif /* MDEV_H */ 157#endif /* MDEV_H */