Lines Matching refs:matrix_dev
26 struct ap_matrix_dev *matrix_dev; variable
57 struct ap_matrix_dev *matrix_dev = dev_get_drvdata(dev); in vfio_ap_matrix_dev_release() local
59 kfree(matrix_dev); in vfio_ap_matrix_dev_release()
91 matrix_dev = kzalloc(sizeof(*matrix_dev), GFP_KERNEL); in vfio_ap_matrix_dev_create()
92 if (!matrix_dev) { in vfio_ap_matrix_dev_create()
99 ret = ap_qci(&matrix_dev->info); in vfio_ap_matrix_dev_create()
104 mutex_init(&matrix_dev->mdevs_lock); in vfio_ap_matrix_dev_create()
105 INIT_LIST_HEAD(&matrix_dev->mdev_list); in vfio_ap_matrix_dev_create()
106 mutex_init(&matrix_dev->guests_lock); in vfio_ap_matrix_dev_create()
108 dev_set_name(&matrix_dev->device, "%s", VFIO_AP_DEV_NAME); in vfio_ap_matrix_dev_create()
109 matrix_dev->device.parent = root_device; in vfio_ap_matrix_dev_create()
110 matrix_dev->device.bus = &matrix_bus; in vfio_ap_matrix_dev_create()
111 matrix_dev->device.release = vfio_ap_matrix_dev_release; in vfio_ap_matrix_dev_create()
112 matrix_dev->vfio_ap_drv = &vfio_ap_drv; in vfio_ap_matrix_dev_create()
114 ret = device_register(&matrix_dev->device); in vfio_ap_matrix_dev_create()
125 device_unregister(&matrix_dev->device); in vfio_ap_matrix_dev_create()
127 put_device(&matrix_dev->device); in vfio_ap_matrix_dev_create()
137 struct device *root_device = matrix_dev->device.parent; in vfio_ap_matrix_dev_destroy()
140 device_unregister(&matrix_dev->device); in vfio_ap_matrix_dev_destroy()