Lines Matching refs:matrix_dev
26 struct ap_matrix_dev *matrix_dev; variable
39 ATTRIBUTE_GROUPS(matrix_dev);
69 struct ap_matrix_dev *matrix_dev; in vfio_ap_matrix_dev_release() local
71 matrix_dev = container_of(dev, struct ap_matrix_dev, device); in vfio_ap_matrix_dev_release()
72 kfree(matrix_dev); in vfio_ap_matrix_dev_release()
99 matrix_dev = kzalloc(sizeof(*matrix_dev), GFP_KERNEL); in vfio_ap_matrix_dev_create()
100 if (!matrix_dev) { in vfio_ap_matrix_dev_create()
107 ret = ap_qci(&matrix_dev->info); in vfio_ap_matrix_dev_create()
112 mutex_init(&matrix_dev->mdevs_lock); in vfio_ap_matrix_dev_create()
113 INIT_LIST_HEAD(&matrix_dev->mdev_list); in vfio_ap_matrix_dev_create()
114 mutex_init(&matrix_dev->guests_lock); in vfio_ap_matrix_dev_create()
116 dev_set_name(&matrix_dev->device, "%s", VFIO_AP_DEV_NAME); in vfio_ap_matrix_dev_create()
117 matrix_dev->device.parent = root_device; in vfio_ap_matrix_dev_create()
118 matrix_dev->device.bus = &matrix_bus; in vfio_ap_matrix_dev_create()
119 matrix_dev->device.release = vfio_ap_matrix_dev_release; in vfio_ap_matrix_dev_create()
120 matrix_dev->vfio_ap_drv = &vfio_ap_drv; in vfio_ap_matrix_dev_create()
122 ret = device_register(&matrix_dev->device); in vfio_ap_matrix_dev_create()
133 device_del(&matrix_dev->device); in vfio_ap_matrix_dev_create()
135 put_device(&matrix_dev->device); in vfio_ap_matrix_dev_create()
145 struct device *root_device = matrix_dev->device.parent; in vfio_ap_matrix_dev_destroy()
148 device_unregister(&matrix_dev->device); in vfio_ap_matrix_dev_destroy()