Lines Matching defs:dev
13 static void nd_dax_release(struct device *dev)
15 struct nd_region *nd_region = to_nd_region(dev->parent);
16 struct nd_dax *nd_dax = to_nd_dax(dev);
19 dev_dbg(dev, "trace\n");
20 nd_detach_ndns(dev, &nd_pfn->ndns);
26 struct nd_dax *to_nd_dax(struct device *dev)
28 struct nd_dax *nd_dax = container_of(dev, struct nd_dax, nd_pfn.dev);
30 WARN_ON(!is_nd_dax(dev));
41 bool is_nd_dax(struct device *dev)
43 return dev ? dev->type == &nd_dax_device_type : false;
51 struct device *dev;
64 dev = &nd_pfn->dev;
65 dev_set_name(dev, "dax%d.%d", nd_region->id, nd_pfn->id);
66 dev->type = &nd_dax_device_type;
67 dev->parent = &nd_region->dev;
74 struct device *dev = NULL;
77 if (!is_memory(&nd_region->dev))
82 dev = nd_pfn_devinit(&nd_dax->nd_pfn, NULL);
83 __nd_device_register(dev);
84 return dev;
87 int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns)
94 struct nd_region *nd_region = to_nd_region(ndns->dev.parent);
107 nvdimm_bus_lock(&ndns->dev);
111 nvdimm_bus_unlock(&ndns->dev);
114 pfn_sb = devm_kmalloc(dev, sizeof(*pfn_sb), GFP_KERNEL);
117 dev_dbg(dev, "dax: %s\n", rc == 0 ? dev_name(dax_dev) : "<none>");