]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/nd.h
Merge tag 'platform-drivers-x86-v4.9-2' of git://git.infradead.org/users/dvhart/linux...
[karo-tx-linux.git] / include / linux / nd.h
index f1ea426d6a5e9ca742b7ae02ec03548ccaccd34e..fa66aeed441a5882a1dcad4ad7a8c89faca1abf3 100644 (file)
@@ -77,11 +77,13 @@ struct nd_namespace_io {
  * @nsio: device and system physical address range to drive
  * @alt_name: namespace name supplied in the dimm label
  * @uuid: namespace name supplied in the dimm label
+ * @id: ida allocated id
  */
 struct nd_namespace_pmem {
        struct nd_namespace_io nsio;
        char *alt_name;
        u8 *uuid;
+       int id;
 };
 
 /**
@@ -105,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);
 }