diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2021-08-06 03:19:01 +0200 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2021-08-11 17:50:11 +0200 |
commit | 17a1e4fa3f7f07f541c751745b5aa6f2fcab9a48 (patch) | |
tree | be2b67c0977fd2ff5294414b84cbd126f19d81f8 /samples/vfio-mdev/mtty.c | |
parent | vfio: Provide better generic support for open/release vfio_device_ops (diff) | |
download | linux-17a1e4fa3f7f07f541c751745b5aa6f2fcab9a48.tar.xz 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 '')
-rw-r--r-- | samples/vfio-mdev/mtty.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/samples/vfio-mdev/mtty.c b/samples/vfio-mdev/mtty.c index 37cc9067e160..5983cdb16e3d 100644 --- a/samples/vfio-mdev/mtty.c +++ b/samples/vfio-mdev/mtty.c @@ -1207,17 +1207,6 @@ static long mtty_ioctl(struct vfio_device *vdev, unsigned int cmd, return -ENOTTY; } -static int mtty_open(struct vfio_device *vdev) -{ - pr_info("%s\n", __func__); - return 0; -} - -static void mtty_close(struct vfio_device *mdev) -{ - pr_info("%s\n", __func__); -} - static ssize_t sample_mtty_dev_show(struct device *dev, struct device_attribute *attr, char *buf) @@ -1325,8 +1314,6 @@ static struct attribute_group *mdev_type_groups[] = { static const struct vfio_device_ops mtty_dev_ops = { .name = "vfio-mtty", - .open = mtty_open, - .release = mtty_close, .read = mtty_read, .write = mtty_write, .ioctl = mtty_ioctl, |