Searched refs:ucm_dev (Results 1 - 1 of 1) sorted by relevance
/linux-4.4.14/drivers/infiniband/core/ |
H A D | ucm.c | 1202 struct ib_ucm_device *ucm_dev; ib_ucm_release_dev() local 1204 ucm_dev = container_of(dev, struct ib_ucm_device, dev); ib_ucm_release_dev() 1205 cdev_del(&ucm_dev->cdev); ib_ucm_release_dev() 1206 if (ucm_dev->devnum < IB_UCM_MAX_DEVICES) ib_ucm_release_dev() 1207 clear_bit(ucm_dev->devnum, dev_map); ib_ucm_release_dev() 1209 clear_bit(ucm_dev->devnum - IB_UCM_MAX_DEVICES, overflow_map); ib_ucm_release_dev() 1210 kfree(ucm_dev); ib_ucm_release_dev() 1225 struct ib_ucm_device *ucm_dev; show_ibdev() local 1227 ucm_dev = container_of(dev, struct ib_ucm_device, dev); show_ibdev() 1228 return sprintf(buf, "%s\n", ucm_dev->ib_dev->name); show_ibdev() 1257 struct ib_ucm_device *ucm_dev; ib_ucm_add_one() local 1262 ucm_dev = kzalloc(sizeof *ucm_dev, GFP_KERNEL); ib_ucm_add_one() 1263 if (!ucm_dev) ib_ucm_add_one() 1266 ucm_dev->ib_dev = device; ib_ucm_add_one() 1274 ucm_dev->devnum = devnum + IB_UCM_MAX_DEVICES; ib_ucm_add_one() 1278 ucm_dev->devnum = devnum; ib_ucm_add_one() 1283 cdev_init(&ucm_dev->cdev, &ucm_fops); ib_ucm_add_one() 1284 ucm_dev->cdev.owner = THIS_MODULE; ib_ucm_add_one() 1285 kobject_set_name(&ucm_dev->cdev.kobj, "ucm%d", ucm_dev->devnum); ib_ucm_add_one() 1286 if (cdev_add(&ucm_dev->cdev, base, 1)) ib_ucm_add_one() 1289 ucm_dev->dev.class = &cm_class; ib_ucm_add_one() 1290 ucm_dev->dev.parent = device->dma_device; ib_ucm_add_one() 1291 ucm_dev->dev.devt = ucm_dev->cdev.dev; ib_ucm_add_one() 1292 ucm_dev->dev.release = ib_ucm_release_dev; ib_ucm_add_one() 1293 dev_set_name(&ucm_dev->dev, "ucm%d", ucm_dev->devnum); ib_ucm_add_one() 1294 if (device_register(&ucm_dev->dev)) ib_ucm_add_one() 1297 if (device_create_file(&ucm_dev->dev, &dev_attr_ibdev)) ib_ucm_add_one() 1300 ib_set_client_data(device, &ucm_client, ucm_dev); ib_ucm_add_one() 1304 device_unregister(&ucm_dev->dev); ib_ucm_add_one() 1306 cdev_del(&ucm_dev->cdev); ib_ucm_add_one() 1307 if (ucm_dev->devnum < IB_UCM_MAX_DEVICES) ib_ucm_add_one() 1312 kfree(ucm_dev); ib_ucm_add_one() 1318 struct ib_ucm_device *ucm_dev = client_data; ib_ucm_remove_one() local 1320 if (!ucm_dev) ib_ucm_remove_one() 1323 device_unregister(&ucm_dev->dev); ib_ucm_remove_one()
|
Completed in 57 milliseconds