summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/nd-core.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/nvdimm/nd-core.h')
-rw-r--r--drivers/nvdimm/nd-core.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/nvdimm/nd-core.h b/drivers/nvdimm/nd-core.h
index 15eff40f55f6..d1351c0b1119 100644
--- a/drivers/nvdimm/nd-core.h
+++ b/drivers/nvdimm/nd-core.h
@@ -57,6 +57,15 @@ static inline enum nvdimm_security_state nvdimm_security_state(
return nvdimm->sec.ops->state(nvdimm);
}
int nvdimm_security_freeze(struct nvdimm *nvdimm);
+#if IS_ENABLED(CONFIG_NVDIMM_KEYS)
+int nvdimm_security_disable(struct nvdimm *nvdimm, unsigned int keyid);
+#else
+static inline int nvdimm_security_disable(struct nvdimm *nvdimm,
+ unsigned int keyid)
+{
+ return -EOPNOTSUPP;
+}
+#endif
/**
* struct blk_alloc_info - tracking info for BLK dpa scanning