Merge tag 'printk-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek...
[linux-2.6-microblaze.git] / drivers / nvdimm / dimm_devs.c
index 06f5087..ecbab2d 100644 (file)
@@ -11,6 +11,7 @@
  * General Public License for more details.
  */
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#include <linux/moduleparam.h>
 #include <linux/vmalloc.h>
 #include <linux/device.h>
 #include <linux/ndctl.h>
 
 static DEFINE_IDA(dimm_ida);
 
+static bool noblk;
+module_param(noblk, bool, 0444);
+MODULE_PARM_DESC(noblk, "force disable BLK / local alias support");
+
 /*
  * Retrieve bus and dimm handle and return if this bus supports
  * get_config_data commands
@@ -551,6 +556,8 @@ struct nvdimm *__nvdimm_create(struct nvdimm_bus *nvdimm_bus,
 
        nvdimm->dimm_id = dimm_id;
        nvdimm->provider_data = provider_data;
+       if (noblk)
+               flags |= 1 << NDD_NOBLK;
        nvdimm->flags = flags;
        nvdimm->cmd_mask = cmd_mask;
        nvdimm->num_flush = num_flush;