To use nfit_test.ko can use the definition of NFIT_CMD_TRANSLATE_SPA,
the defintion is moved from nfit/core.c to ndctl.h.

Probably, other NFIT_CMD_XXX defintions will be used by nfit_test.ko in future.
move them to ndctl.h at this time.

---
 drivers/acpi/nfit/core.c   | 11 -----------
 include/uapi/linux/ndctl.h | 11 +++++++++++
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index 19182d0..00e49c2 100644
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -1621,17 +1621,6 @@ static int acpi_nfit_register_dimms(struct 
acpi_nfit_desc *acpi_desc)
                        acpi_desc);
 }
 
-/*
- * These constants are private because there are no kernel consumers of
- * these commands.
- */
-enum nfit_aux_cmds {
-        NFIT_CMD_TRANSLATE_SPA = 5,
-        NFIT_CMD_ARS_INJECT_SET = 7,
-        NFIT_CMD_ARS_INJECT_CLEAR = 8,
-        NFIT_CMD_ARS_INJECT_GET = 9,
-};
-
 static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc)
 {
        struct nvdimm_bus_descriptor *nd_desc = &acpi_desc->nd_desc;
diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h
index 6d3c542..a359d19 100644
--- a/include/uapi/linux/ndctl.h
+++ b/include/uapi/linux/ndctl.h
@@ -204,6 +204,17 @@ enum {
        ND_CMD_CALL = 10,
 };
 
+/*
+ * Though These constants are mainly used by acpi nfit driver,
+ * they are defined here for nfit_test.ko to be able to use them.
+ */
+enum nfit_aux_cmds {
+        NFIT_CMD_TRANSLATE_SPA = 5,
+        NFIT_CMD_ARS_INJECT_SET = 7,
+        NFIT_CMD_ARS_INJECT_CLEAR = 8,
+        NFIT_CMD_ARS_INJECT_GET = 9,
+};
+
 enum {
        ND_ARS_VOLATILE = 1,
        ND_ARS_PERSISTENT = 2,



_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to