mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 06:52:07 +00:00
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>
This commit is contained in:
parent
42930553a7
commit
9372e6feaa
6 changed files with 23 additions and 15 deletions
|
@ -13,19 +13,6 @@
|
|||
#ifndef MDEV_H
|
||||
#define MDEV_H
|
||||
|
||||
/* Parent device */
|
||||
struct mdev_parent {
|
||||
struct device *dev;
|
||||
const struct mdev_parent_ops *ops;
|
||||
|
||||
/* internal */
|
||||
struct kref ref;
|
||||
struct mutex lock;
|
||||
struct list_head next;
|
||||
struct kset *mdev_types_kset;
|
||||
struct list_head type_list;
|
||||
};
|
||||
|
||||
/* Mediated device */
|
||||
struct mdev_device {
|
||||
struct device dev;
|
||||
|
@ -165,4 +152,6 @@ extern void mdev_unregister_device(struct device *dev);
|
|||
extern int mdev_register_driver(struct mdev_driver *drv, struct module *owner);
|
||||
extern void mdev_unregister_driver(struct mdev_driver *drv);
|
||||
|
||||
extern struct device *mdev_parent_dev(struct mdev_device *mdev);
|
||||
|
||||
#endif /* MDEV_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue