aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nd.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2016-10-05 14:04:15 -0700
committerDan Williams <dan.j.williams@intel.com>2016-10-07 09:20:53 -0700
commit6ff3e912d32ece4e9cf8708da796e9e2e7979ffe (patch)
tree690a3f33c527aa16150ab208b535c42d97ea5cb3 /include/linux/nd.h
parentlibnvdimm, namespace: allow multiple pmem-namespaces per region at scan time (diff)
downloadlinux-dev-6ff3e912d32ece4e9cf8708da796e9e2e7979ffe.tar.xz
linux-dev-6ff3e912d32ece4e9cf8708da796e9e2e7979ffe.zip
libnvdimm, namespace: sort namespaces by dpa at init
Add more determinism to initial namespace device-name assignments by sorting the namespaces by starting dpa. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/nd.h')
-rw-r--r--include/linux/nd.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/nd.h b/include/linux/nd.h
index ddcc7788305c..fa66aeed441a 100644
--- a/include/linux/nd.h
+++ b/include/linux/nd.h
@@ -107,19 +107,19 @@ struct nd_namespace_blk {
struct resource **res;
};
-static inline struct nd_namespace_io *to_nd_namespace_io(struct device *dev)
+static inline struct nd_namespace_io *to_nd_namespace_io(const struct device *dev)
{
return container_of(dev, struct nd_namespace_io, common.dev);
}
-static inline struct nd_namespace_pmem *to_nd_namespace_pmem(struct device *dev)
+static inline struct nd_namespace_pmem *to_nd_namespace_pmem(const struct device *dev)
{
struct nd_namespace_io *nsio = to_nd_namespace_io(dev);
return container_of(nsio, struct nd_namespace_pmem, nsio);
}
-static inline struct nd_namespace_blk *to_nd_namespace_blk(struct device *dev)
+static inline struct nd_namespace_blk *to_nd_namespace_blk(const struct device *dev)
{
return container_of(dev, struct nd_namespace_blk, common.dev);
}