diff options
author | Dave Jiang <dave.jiang@intel.com> | 2018-12-04 10:31:20 -0800 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-12-13 17:54:12 -0800 |
commit | d6548ae4d16dc231dec22860c9c472bcb991fb15 (patch) | |
tree | 429441594a2e3f96b62417a7361efc11f9bdb9fd /drivers/acpi/nfit/nfit.h | |
parent | b3ed2ce024c36054e51cca2eb31a1cdbe4a5f11e (diff) |
acpi/nfit, libnvdimm: Store dimm id as a member to struct nvdimm
The generated dimm id is needed for the sysfs attribute as well as being
used as the identifier/description for the security key. Since it's
constant and should never change, store it as a member of struct nvdimm.
As nvdimm_create() continues to grow parameters relative to NFIT driver
requirements, do not require other implementations to keep pace.
Introduce __nvdimm_create() to carry the new parameters and keep
nvdimm_create() with the long standing default api.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/acpi/nfit/nfit.h')
-rw-r--r-- | drivers/acpi/nfit/nfit.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/nfit/nfit.h b/drivers/acpi/nfit/nfit.h index ecde13a9199d..33691aecfcee 100644 --- a/drivers/acpi/nfit/nfit.h +++ b/drivers/acpi/nfit/nfit.h @@ -183,6 +183,8 @@ enum nfit_mem_flags { NFIT_MEM_DIRTY_COUNT, }; +#define NFIT_DIMM_ID_LEN 22 + /* assembled tables for a given dimm/memory-device */ struct nfit_mem { struct nvdimm *nvdimm; @@ -200,6 +202,7 @@ struct nfit_mem { struct list_head list; struct acpi_device *adev; struct acpi_nfit_desc *acpi_desc; + char id[NFIT_DIMM_ID_LEN+1]; struct resource *flush_wpq; unsigned long dsm_mask; unsigned long flags; |