Lines Matching refs:cdev
384 struct ib_core_device *cdev;
389 xa_for_each (&device->compat_devs, index, cdev) {
390 ret = device_rename(&cdev->dev, dev_name(&device->dev));
392 dev_warn(&cdev->dev,
914 struct ib_core_device *cdev =
917 kfree(cdev);
923 struct ib_core_device *cdev;
944 cdev = xa_load(&device->compat_devs, rnet->id);
945 if (cdev) {
953 cdev = kzalloc(sizeof(*cdev), GFP_KERNEL);
954 if (!cdev) {
959 cdev->dev.parent = device->dev.parent;
960 rdma_init_coredev(cdev, device, read_pnet(&rnet->net));
961 cdev->dev.release = compatdev_release;
962 ret = dev_set_name(&cdev->dev, "%s", dev_name(&device->dev));
966 ret = device_add(&cdev->dev);
969 ret = ib_setup_port_attrs(cdev);
974 cdev, GFP_KERNEL));
982 ib_free_port_attrs(cdev);
984 device_del(&cdev->dev);
986 put_device(&cdev->dev);
996 struct ib_core_device *cdev;
999 cdev = xa_erase(&device->compat_devs, id);
1001 if (cdev) {
1002 ib_free_port_attrs(cdev);
1003 device_del(&cdev->dev);
1004 put_device(&cdev->dev);
1010 struct ib_core_device *cdev;
1013 xa_for_each (&device->compat_devs, index, cdev)
1037 struct ib_compat_device *cdev;
1049 xa_for_each (&dev->compat_devs, c_index, cdev)
1870 if (!ret && res->cdev)
1871 get_device(res->cdev);
1902 * The cdev is guaranteed valid as long as we are inside the
1906 if (!ret && res->cdev)
1907 get_device(res->cdev);
1945 if (WARN_ON(!res->cdev))