aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/nd.h')
-rw-r--r--include/linux/nd.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/nd.h b/include/linux/nd.h
index f1ea426d6a5e..fa66aeed441a 100644
--- a/include/linux/nd.h
+++ b/include/linux/nd.h
@@ -77,11 +77,13 @@ struct nd_namespace_io {
77 * @nsio: device and system physical address range to drive 77 * @nsio: device and system physical address range to drive
78 * @alt_name: namespace name supplied in the dimm label 78 * @alt_name: namespace name supplied in the dimm label
79 * @uuid: namespace name supplied in the dimm label 79 * @uuid: namespace name supplied in the dimm label
80 * @id: ida allocated id
80 */ 81 */
81struct nd_namespace_pmem { 82struct nd_namespace_pmem {
82 struct nd_namespace_io nsio; 83 struct nd_namespace_io nsio;
83 char *alt_name; 84 char *alt_name;
84 u8 *uuid; 85 u8 *uuid;
86 int id;
85}; 87};
86 88
87/** 89/**
@@ -105,19 +107,19 @@ struct nd_namespace_blk {
105 struct resource **res; 107 struct resource **res;
106}; 108};
107 109
108static inline struct nd_namespace_io *to_nd_namespace_io(struct device *dev) 110static inline struct nd_namespace_io *to_nd_namespace_io(const struct device *dev)
109{ 111{
110 return container_of(dev, struct nd_namespace_io, common.dev); 112 return container_of(dev, struct nd_namespace_io, common.dev);
111} 113}
112 114
113static inline struct nd_namespace_pmem *to_nd_namespace_pmem(struct device *dev) 115static inline struct nd_namespace_pmem *to_nd_namespace_pmem(const struct device *dev)
114{ 116{
115 struct nd_namespace_io *nsio = to_nd_namespace_io(dev); 117 struct nd_namespace_io *nsio = to_nd_namespace_io(dev);
116 118
117 return container_of(nsio, struct nd_namespace_pmem, nsio); 119 return container_of(nsio, struct nd_namespace_pmem, nsio);
118} 120}
119 121
120static inline struct nd_namespace_blk *to_nd_namespace_blk(struct device *dev) 122static inline struct nd_namespace_blk *to_nd_namespace_blk(const struct device *dev)
121{ 123{
122 return container_of(dev, struct nd_namespace_blk, common.dev); 124 return container_of(dev, struct nd_namespace_blk, common.dev);
123} 125}