Lines Matching full:vdev
20 static struct resource *get_amba_resource(struct vfio_platform_device *vdev, in get_amba_resource() argument
23 struct amba_device *adev = (struct amba_device *) vdev->opaque; in get_amba_resource()
31 static int get_amba_irq(struct vfio_platform_device *vdev, int i) in get_amba_irq() argument
33 struct amba_device *adev = (struct amba_device *) vdev->opaque; in get_amba_irq()
45 struct vfio_platform_device *vdev; in vfio_amba_probe() local
48 vdev = kzalloc(sizeof(*vdev), GFP_KERNEL); in vfio_amba_probe()
49 if (!vdev) in vfio_amba_probe()
52 vdev->name = kasprintf(GFP_KERNEL, "vfio-amba-%08x", adev->periphid); in vfio_amba_probe()
53 if (!vdev->name) { in vfio_amba_probe()
54 kfree(vdev); in vfio_amba_probe()
58 vdev->opaque = (void *) adev; in vfio_amba_probe()
59 vdev->flags = VFIO_DEVICE_FLAGS_AMBA; in vfio_amba_probe()
60 vdev->get_resource = get_amba_resource; in vfio_amba_probe()
61 vdev->get_irq = get_amba_irq; in vfio_amba_probe()
62 vdev->reset_required = false; in vfio_amba_probe()
64 ret = vfio_platform_probe_common(vdev, &adev->dev); in vfio_amba_probe()
66 kfree(vdev->name); in vfio_amba_probe()
67 kfree(vdev); in vfio_amba_probe()
71 dev_set_drvdata(&adev->dev, vdev); in vfio_amba_probe()
77 struct vfio_platform_device *vdev = dev_get_drvdata(&adev->dev); in vfio_amba_remove() local
79 vfio_platform_remove_common(vdev); in vfio_amba_remove()
80 kfree(vdev->name); in vfio_amba_remove()
81 kfree(vdev); in vfio_amba_remove()