summaryrefslogtreecommitdiffstats
path: root/samples/vfio-mdev/mdpy.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2021-08-05 22:19:01 -0300
committerAlex Williamson <alex.williamson@redhat.com>2021-08-11 09:50:11 -0600
commit17a1e4fa3f7f07f541c751745b5aa6f2fcab9a48 (patch)
treebe2b67c0977fd2ff5294414b84cbd126f19d81f8 /samples/vfio-mdev/mdpy.c
parent2fd585f4ed9de9b9259e95affdd7d8cde06b48c3 (diff)
downloadlinux-17a1e4fa3f7f07f541c751745b5aa6f2fcab9a48.tar.gz
linux-17a1e4fa3f7f07f541c751745b5aa6f2fcab9a48.tar.bz2
linux-17a1e4fa3f7f07f541c751745b5aa6f2fcab9a48.zip
vfio/samples: Delete useless open/close
The core code no longer requires these ops to be defined, so delete these empty functions and leave the op as NULL. mtty's functions only log a pointless message, delete that entirely. Signed-off-by: Yishai Hadas <yishaih@nvidia.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/5-v4-9ea22c5e6afb+1adf-vfio_reflck_jgg@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'samples/vfio-mdev/mdpy.c')
-rw-r--r--samples/vfio-mdev/mdpy.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/samples/vfio-mdev/mdpy.c b/samples/vfio-mdev/mdpy.c
index 57334034cde6..8d1a80a0722a 100644
--- a/samples/vfio-mdev/mdpy.c
+++ b/samples/vfio-mdev/mdpy.c
@@ -614,15 +614,6 @@ static long mdpy_ioctl(struct vfio_device *vdev, unsigned int cmd,
return -ENOTTY;
}
-static int mdpy_open(struct vfio_device *vdev)
-{
- return 0;
-}
-
-static void mdpy_close(struct vfio_device *vdev)
-{
-}
-
static ssize_t
resolution_show(struct device *dev, struct device_attribute *attr,
char *buf)
@@ -717,8 +708,6 @@ static struct attribute_group *mdev_type_groups[] = {
};
static const struct vfio_device_ops mdpy_dev_ops = {
- .open = mdpy_open,
- .release = mdpy_close,
.read = mdpy_read,
.write = mdpy_write,
.ioctl = mdpy_ioctl,