Lines Matching refs:vdev
28 static struct resource *get_amba_resource(struct vfio_platform_device *vdev, in get_amba_resource() argument
31 struct amba_device *adev = (struct amba_device *) vdev->opaque; in get_amba_resource()
39 static int get_amba_irq(struct vfio_platform_device *vdev, int i) in get_amba_irq() argument
41 struct amba_device *adev = (struct amba_device *) vdev->opaque; in get_amba_irq()
53 struct vfio_platform_device *vdev; in vfio_amba_probe() local
56 vdev = kzalloc(sizeof(*vdev), GFP_KERNEL); in vfio_amba_probe()
57 if (!vdev) in vfio_amba_probe()
60 vdev->name = kasprintf(GFP_KERNEL, "vfio-amba-%08x", adev->periphid); in vfio_amba_probe()
61 if (!vdev->name) { in vfio_amba_probe()
62 kfree(vdev); in vfio_amba_probe()
66 vdev->opaque = (void *) adev; in vfio_amba_probe()
67 vdev->flags = VFIO_DEVICE_FLAGS_AMBA; in vfio_amba_probe()
68 vdev->get_resource = get_amba_resource; in vfio_amba_probe()
69 vdev->get_irq = get_amba_irq; in vfio_amba_probe()
70 vdev->parent_module = THIS_MODULE; in vfio_amba_probe()
72 ret = vfio_platform_probe_common(vdev, &adev->dev); in vfio_amba_probe()
74 kfree(vdev->name); in vfio_amba_probe()
75 kfree(vdev); in vfio_amba_probe()
83 struct vfio_platform_device *vdev; in vfio_amba_remove() local
85 vdev = vfio_platform_remove_common(&adev->dev); in vfio_amba_remove()
86 if (vdev) { in vfio_amba_remove()
87 kfree(vdev->name); in vfio_amba_remove()
88 kfree(vdev); in vfio_amba_remove()