Lines Matching refs:ndd
26 struct nvdimm_drvdata *ndd; in nvdimm_probe() local
37 ndd = kzalloc(sizeof(*ndd), GFP_KERNEL); in nvdimm_probe()
38 if (!ndd) in nvdimm_probe()
41 dev_set_drvdata(dev, ndd); in nvdimm_probe()
42 ndd->dpa.name = dev_name(dev); in nvdimm_probe()
43 ndd->ns_current = -1; in nvdimm_probe()
44 ndd->ns_next = -1; in nvdimm_probe()
45 ndd->dpa.start = 0; in nvdimm_probe()
46 ndd->dpa.end = -1; in nvdimm_probe()
47 ndd->dev = dev; in nvdimm_probe()
49 kref_init(&ndd->kref); in nvdimm_probe()
51 rc = nvdimm_init_nsarea(ndd); in nvdimm_probe()
55 rc = nvdimm_init_config_data(ndd); in nvdimm_probe()
59 dev_dbg(dev, "config data size: %d\n", ndd->nsarea.config_size); in nvdimm_probe()
62 ndd->ns_current = nd_label_validate(ndd); in nvdimm_probe()
63 ndd->ns_next = nd_label_next_nsindex(ndd->ns_current); in nvdimm_probe()
64 nd_label_copy(ndd, to_next_namespace_index(ndd), in nvdimm_probe()
65 to_current_namespace_index(ndd)); in nvdimm_probe()
66 rc = nd_label_reserve_dpa(ndd); in nvdimm_probe()
75 put_ndd(ndd); in nvdimm_probe()
81 struct nvdimm_drvdata *ndd = dev_get_drvdata(dev); in nvdimm_remove() local
83 if (!ndd) in nvdimm_remove()
89 put_ndd(ndd); in nvdimm_remove()