Lines Matching refs:matrix_dev
26 struct ap_matrix_dev *matrix_dev; variable
57 struct ap_matrix_dev *matrix_dev; in vfio_ap_matrix_dev_release() local
59 matrix_dev = container_of(dev, struct ap_matrix_dev, device); in vfio_ap_matrix_dev_release()
60 kfree(matrix_dev); in vfio_ap_matrix_dev_release()
86 matrix_dev = kzalloc(sizeof(*matrix_dev), GFP_KERNEL); in vfio_ap_matrix_dev_create()
87 if (!matrix_dev) { in vfio_ap_matrix_dev_create()
94 ret = ap_qci(&matrix_dev->info); in vfio_ap_matrix_dev_create()
99 mutex_init(&matrix_dev->mdevs_lock); in vfio_ap_matrix_dev_create()
100 INIT_LIST_HEAD(&matrix_dev->mdev_list); in vfio_ap_matrix_dev_create()
101 mutex_init(&matrix_dev->guests_lock); in vfio_ap_matrix_dev_create()
103 dev_set_name(&matrix_dev->device, "%s", VFIO_AP_DEV_NAME); in vfio_ap_matrix_dev_create()
104 matrix_dev->device.parent = root_device; in vfio_ap_matrix_dev_create()
105 matrix_dev->device.bus = &matrix_bus; in vfio_ap_matrix_dev_create()
106 matrix_dev->device.release = vfio_ap_matrix_dev_release; in vfio_ap_matrix_dev_create()
107 matrix_dev->vfio_ap_drv = &vfio_ap_drv; in vfio_ap_matrix_dev_create()
109 ret = device_register(&matrix_dev->device); in vfio_ap_matrix_dev_create()
120 device_del(&matrix_dev->device); in vfio_ap_matrix_dev_create()
122 put_device(&matrix_dev->device); in vfio_ap_matrix_dev_create()
132 struct device *root_device = matrix_dev->device.parent; in vfio_ap_matrix_dev_destroy()
135 device_unregister(&matrix_dev->device); in vfio_ap_matrix_dev_destroy()