vfio/pci: Rename ops functions to fit core namings
This is another preparation patch for separating the vfio_pci driver to a subsystem driver and a generic pci driver. This patch doesn't change any logic. Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Yishai Hadas <yishaih@nvidia.com> Link: https://lore.kernel.org/r/20210826103912.128972-5-yishaih@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
536475109c
commit
bf9fdc9a74
@ -533,7 +533,7 @@ static void vfio_pci_vf_token_user_add(struct vfio_pci_core_device *vdev, int va
|
||||
vfio_device_put(&pf_vdev->vdev);
|
||||
}
|
||||
|
||||
static void vfio_pci_close_device(struct vfio_device *core_vdev)
|
||||
static void vfio_pci_core_close_device(struct vfio_device *core_vdev)
|
||||
{
|
||||
struct vfio_pci_core_device *vdev =
|
||||
container_of(core_vdev, struct vfio_pci_core_device, vdev);
|
||||
@ -554,7 +554,7 @@ static void vfio_pci_close_device(struct vfio_device *core_vdev)
|
||||
mutex_unlock(&vdev->igate);
|
||||
}
|
||||
|
||||
static int vfio_pci_open_device(struct vfio_device *core_vdev)
|
||||
static int vfio_pci_core_open_device(struct vfio_device *core_vdev)
|
||||
{
|
||||
struct vfio_pci_core_device *vdev =
|
||||
container_of(core_vdev, struct vfio_pci_core_device, vdev);
|
||||
@ -727,7 +727,7 @@ int vfio_pci_register_dev_region(struct vfio_pci_core_device *vdev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long vfio_pci_ioctl(struct vfio_device *core_vdev,
|
||||
static long vfio_pci_core_ioctl(struct vfio_device *core_vdev,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct vfio_pci_core_device *vdev =
|
||||
@ -1302,7 +1302,7 @@ static ssize_t vfio_pci_rw(struct vfio_pci_core_device *vdev, char __user *buf,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static ssize_t vfio_pci_read(struct vfio_device *core_vdev, char __user *buf,
|
||||
static ssize_t vfio_pci_core_read(struct vfio_device *core_vdev, char __user *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct vfio_pci_core_device *vdev =
|
||||
@ -1314,7 +1314,7 @@ static ssize_t vfio_pci_read(struct vfio_device *core_vdev, char __user *buf,
|
||||
return vfio_pci_rw(vdev, buf, count, ppos, false);
|
||||
}
|
||||
|
||||
static ssize_t vfio_pci_write(struct vfio_device *core_vdev, const char __user *buf,
|
||||
static ssize_t vfio_pci_core_write(struct vfio_device *core_vdev, const char __user *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct vfio_pci_core_device *vdev =
|
||||
@ -1533,7 +1533,7 @@ static const struct vm_operations_struct vfio_pci_mmap_ops = {
|
||||
.fault = vfio_pci_mmap_fault,
|
||||
};
|
||||
|
||||
static int vfio_pci_mmap(struct vfio_device *core_vdev, struct vm_area_struct *vma)
|
||||
static int vfio_pci_core_mmap(struct vfio_device *core_vdev, struct vm_area_struct *vma)
|
||||
{
|
||||
struct vfio_pci_core_device *vdev =
|
||||
container_of(core_vdev, struct vfio_pci_core_device, vdev);
|
||||
@ -1604,7 +1604,7 @@ static int vfio_pci_mmap(struct vfio_device *core_vdev, struct vm_area_struct *v
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void vfio_pci_request(struct vfio_device *core_vdev, unsigned int count)
|
||||
static void vfio_pci_core_request(struct vfio_device *core_vdev, unsigned int count)
|
||||
{
|
||||
struct vfio_pci_core_device *vdev =
|
||||
container_of(core_vdev, struct vfio_pci_core_device, vdev);
|
||||
@ -1720,7 +1720,7 @@ static int vfio_pci_validate_vf_token(struct vfio_pci_core_device *vdev,
|
||||
|
||||
#define VF_TOKEN_ARG "vf_token="
|
||||
|
||||
static int vfio_pci_match(struct vfio_device *core_vdev, char *buf)
|
||||
static int vfio_pci_core_match(struct vfio_device *core_vdev, char *buf)
|
||||
{
|
||||
struct vfio_pci_core_device *vdev =
|
||||
container_of(core_vdev, struct vfio_pci_core_device, vdev);
|
||||
@ -1772,14 +1772,14 @@ static int vfio_pci_match(struct vfio_device *core_vdev, char *buf)
|
||||
|
||||
static const struct vfio_device_ops vfio_pci_ops = {
|
||||
.name = "vfio-pci",
|
||||
.open_device = vfio_pci_open_device,
|
||||
.close_device = vfio_pci_close_device,
|
||||
.ioctl = vfio_pci_ioctl,
|
||||
.read = vfio_pci_read,
|
||||
.write = vfio_pci_write,
|
||||
.mmap = vfio_pci_mmap,
|
||||
.request = vfio_pci_request,
|
||||
.match = vfio_pci_match,
|
||||
.open_device = vfio_pci_core_open_device,
|
||||
.close_device = vfio_pci_core_close_device,
|
||||
.ioctl = vfio_pci_core_ioctl,
|
||||
.read = vfio_pci_core_read,
|
||||
.write = vfio_pci_core_write,
|
||||
.mmap = vfio_pci_core_mmap,
|
||||
.request = vfio_pci_core_request,
|
||||
.match = vfio_pci_core_match,
|
||||
};
|
||||
|
||||
static int vfio_pci_bus_notifier(struct notifier_block *nb,
|
||||
|
Loading…
Reference in New Issue
Block a user