vfio/mdev: Synchronize device create/remove with parent removal
[sfrench/cifs-2.6.git] / drivers / vfio / mdev / mdev_private.h
index 36cbbdb754deade31338b715a0750b0172553617..39876752627679149180e19492893a24109f5597 100644 (file)
@@ -23,6 +23,8 @@ struct mdev_parent {
        struct list_head next;
        struct kset *mdev_types_kset;
        struct list_head type_list;
+       /* Synchronize device creation/removal with parent unregistration */
+       struct rw_semaphore unreg_sem;
 };
 
 struct mdev_device {
@@ -60,6 +62,6 @@ void mdev_remove_sysfs_files(struct device *dev, struct mdev_type *type);
 
 int  mdev_device_create(struct kobject *kobj,
                        struct device *dev, const guid_t *uuid);
-int  mdev_device_remove(struct device *dev, bool force_remove);
+int  mdev_device_remove(struct device *dev);
 
 #endif /* MDEV_PRIVATE_H */