aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mdev.h
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2021-04-06 16:40:40 -0300
committerAlex Williamson <alex.williamson@redhat.com>2021-04-12 10:36:00 -0600
commitc2ef2f50ad0ccf5460bf4824bc6669240b6c7936 (patch)
treeb9fbaa129e752cd51b85aef7b6dfdd672f6781ca /include/linux/mdev.h
parentvfio/gvt: Use mdev_get_type_group_id() (diff)
downloadlinux-dev-c2ef2f50ad0ccf5460bf4824bc6669240b6c7936.tar.xz
linux-dev-c2ef2f50ad0ccf5460bf4824bc6669240b6c7936.zip
vfio/mdev: Remove kobj from mdev_parent_ops->create()
The kobj here is a type-erased version of mdev_type, which is already stored in the struct mdev_device being passed in. It was only ever used to compute the type_group_id, which is now extracted directly from the mdev. Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Message-Id: <17-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'include/linux/mdev.h')
-rw-r--r--include/linux/mdev.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/mdev.h b/include/linux/mdev.h
index 41e919365223..c3a800051d61 100644
--- a/include/linux/mdev.h
+++ b/include/linux/mdev.h
@@ -61,7 +61,6 @@ unsigned int mtype_get_type_group_id(struct kobject *mtype_kobj);
* @create: Called to allocate basic resources in parent device's
* driver for a particular mediated device. It is
* mandatory to provide create ops.
- * @kobj: kobject of type for which 'create' is called.
* @mdev: mdev_device structure on of mediated device
* that is being created
* Returns integer: success (0) or error (< 0)
@@ -107,7 +106,7 @@ struct mdev_parent_ops {
const struct attribute_group **mdev_attr_groups;
struct attribute_group **supported_type_groups;
- int (*create)(struct kobject *kobj, struct mdev_device *mdev);
+ int (*create)(struct mdev_device *mdev);
int (*remove)(struct mdev_device *mdev);
int (*open)(struct mdev_device *mdev);
void (*release)(struct mdev_device *mdev);