diff options
author | Linda Knippers <linda.knippers@hpe.com> | 2015-11-20 19:05:49 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2015-11-30 14:51:46 -0800 |
commit | 6b577c9d772c45448aec784ec235cea228b4d3ad (patch) | |
tree | 1a94393c25921fe612186623e122f8c3fe566668 /drivers/acpi/nfit.h | |
parent | ff5a55f89c6690a0b292f1a7e0cd4532961588d5 (diff) | |
download | linux-6b577c9d772c45448aec784ec235cea228b4d3ad.tar.gz linux-6b577c9d772c45448aec784ec235cea228b4d3ad.tar.bz2 linux-6b577c9d772c45448aec784ec235cea228b4d3ad.zip |
nfit: Adjust for different _FIT and NFIT headers
When support for _FIT was added, the code presumed that the data
returned by the _FIT method is identical to the NFIT table, which
starts with an acpi_table_header. However, the _FIT is defined
to return a data in the format of a series of NFIT type structure
entries and as a method, has an acpi_object header rather tahn
an acpi_table_header.
To address the differences, explicitly save the acpi_table_header
from the NFIT, since it is accessible through /sys, and change
the nfit pointer in the acpi_desc structure to point to the
table entries rather than the headers.
Reported-by: Jeff Moyer (jmoyer@redhat.com>
Signed-off-by: Linda Knippers <linda.knippers@hpe.com>
Acked-by: Vishal Verma <vishal.l.verma@intel.com>
[vishal: fix up unit test for new header assumptions]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/acpi/nfit.h')
-rw-r--r-- | drivers/acpi/nfit.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/acpi/nfit.h b/drivers/acpi/nfit.h index 2ea5c0797c8f..3d549a383659 100644 --- a/drivers/acpi/nfit.h +++ b/drivers/acpi/nfit.h @@ -96,7 +96,8 @@ struct nfit_mem { struct acpi_nfit_desc { struct nvdimm_bus_descriptor nd_desc; - struct acpi_table_nfit *nfit; + struct acpi_table_header acpi_header; + struct acpi_nfit_header *nfit; struct mutex spa_map_mutex; struct mutex init_mutex; struct list_head spa_maps; |