mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-22 20:43:56 +08:00
vfio/samples: Remove module get/put
The patch to move the get/put to core and the patch to convert the samples to use vfio_device crossed in a way that this was missed. When both patches are together the samples do not need their own get/put. Fixes:437e41368c
("vfio/mdpy: Convert to use vfio_register_group_dev()") Fixes:681c1615f8
("vfio/mbochs: Convert to use vfio_register_group_dev()") Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com> Link: https://lore.kernel.org/r/1-v4-9ea22c5e6afb+1adf-vfio_reflck_jgg@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
3fb1712d85
commit
e1706f0764
@ -1274,9 +1274,6 @@ static long mbochs_ioctl(struct vfio_device *vdev, unsigned int cmd,
|
||||
|
||||
static int mbochs_open(struct vfio_device *vdev)
|
||||
{
|
||||
if (!try_module_get(THIS_MODULE))
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1300,7 +1297,6 @@ static void mbochs_close(struct vfio_device *vdev)
|
||||
mbochs_put_pages(mdev_state);
|
||||
|
||||
mutex_unlock(&mdev_state->ops_lock);
|
||||
module_put(THIS_MODULE);
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
|
@ -611,15 +611,11 @@ static long mdpy_ioctl(struct vfio_device *vdev, unsigned int cmd,
|
||||
|
||||
static int mdpy_open(struct vfio_device *vdev)
|
||||
{
|
||||
if (!try_module_get(THIS_MODULE))
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mdpy_close(struct vfio_device *vdev)
|
||||
{
|
||||
module_put(THIS_MODULE);
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
|
Loading…
Reference in New Issue
Block a user