Lines Matching refs:cxl_nvb

28 	struct cxl_nvdimm_bridge *cxl_nvb = to_cxl_nvdimm_bridge(dev);  in cxl_nvdimm_bridge_release()  local
30 ida_free(&cxl_nvdimm_bridge_ida, cxl_nvb->id); in cxl_nvdimm_bridge_release()
31 kfree(cxl_nvb); in cxl_nvdimm_bridge_release()
87 struct cxl_nvdimm_bridge *cxl_nvb; in cxl_nvdimm_bridge_alloc() local
91 cxl_nvb = kzalloc(sizeof(*cxl_nvb), GFP_KERNEL); in cxl_nvdimm_bridge_alloc()
92 if (!cxl_nvb) in cxl_nvdimm_bridge_alloc()
98 cxl_nvb->id = rc; in cxl_nvdimm_bridge_alloc()
100 dev = &cxl_nvb->dev; in cxl_nvdimm_bridge_alloc()
101 cxl_nvb->port = port; in cxl_nvdimm_bridge_alloc()
102 cxl_nvb->state = CXL_NVB_NEW; in cxl_nvdimm_bridge_alloc()
110 return cxl_nvb; in cxl_nvdimm_bridge_alloc()
113 kfree(cxl_nvb); in cxl_nvdimm_bridge_alloc()
119 struct cxl_nvdimm_bridge *cxl_nvb = _cxl_nvb; in unregister_nvb() local
127 device_lock(&cxl_nvb->dev); in unregister_nvb()
128 flush = cxl_nvb->state != CXL_NVB_NEW; in unregister_nvb()
129 cxl_nvb->state = CXL_NVB_DEAD; in unregister_nvb()
130 device_unlock(&cxl_nvb->dev); in unregister_nvb()
139 device_release_driver(&cxl_nvb->dev); in unregister_nvb()
141 flush_work(&cxl_nvb->state_work); in unregister_nvb()
142 device_unregister(&cxl_nvb->dev); in unregister_nvb()
155 struct cxl_nvdimm_bridge *cxl_nvb; in devm_cxl_add_nvdimm_bridge() local
162 cxl_nvb = cxl_nvdimm_bridge_alloc(port); in devm_cxl_add_nvdimm_bridge()
163 if (IS_ERR(cxl_nvb)) in devm_cxl_add_nvdimm_bridge()
164 return cxl_nvb; in devm_cxl_add_nvdimm_bridge()
166 dev = &cxl_nvb->dev; in devm_cxl_add_nvdimm_bridge()
167 rc = dev_set_name(dev, "nvdimm-bridge%d", cxl_nvb->id); in devm_cxl_add_nvdimm_bridge()
175 rc = devm_add_action_or_reset(host, unregister_nvb, cxl_nvb); in devm_cxl_add_nvdimm_bridge()
179 return cxl_nvb; in devm_cxl_add_nvdimm_bridge()