diff options
author | Christoph Hellwig <hch@lst.de> | 2022-09-23 11:26:47 +0200 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2022-10-04 12:06:58 -0600 |
commit | c7c1f38f6cba7e3249866c06639ea62755f0a24e (patch) | |
tree | 4266150081c8535a130ab2ec68ccac5bc9532cdb /drivers/s390 | |
parent | 062e720cd209d8091c4f3d118d93973f02209aca (diff) | |
download | linux-c7c1f38f6cba7e3249866c06639ea62755f0a24e.tar.gz linux-c7c1f38f6cba7e3249866c06639ea62755f0a24e.tar.bz2 linux-c7c1f38f6cba7e3249866c06639ea62755f0a24e.zip |
vfio/mdev: remove mtype_get_parent_dev
Just open code the dereferences in the only user.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Jason J. Herne <jjherne@linux.ibm.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Link: https://lore.kernel.org/r/20220923092652.100656-10-hch@lst.de
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/vfio_ccw_ops.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/s390/cio/vfio_ccw_ops.c b/drivers/s390/cio/vfio_ccw_ops.c index c37e712a4b06..3db6251b3114 100644 --- a/drivers/s390/cio/vfio_ccw_ops.c +++ b/drivers/s390/cio/vfio_ccw_ops.c @@ -62,8 +62,7 @@ static ssize_t available_instances_show(struct mdev_type *mtype, struct mdev_type_attribute *attr, char *buf) { - struct vfio_ccw_private *private = - dev_get_drvdata(mtype_get_parent_dev(mtype)); + struct vfio_ccw_private *private = dev_get_drvdata(mtype->parent->dev); return sprintf(buf, "%d\n", atomic_read(&private->avail)); } |