aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/nfit.c6
-rw-r--r--drivers/acpi/nfit.h10
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
index 32579a7b71d5..ac6ddcc080d4 100644
--- a/drivers/acpi/nfit.c
+++ b/drivers/acpi/nfit.c
@@ -928,7 +928,7 @@ static ssize_t format_show(struct device *dev,
928{ 928{
929 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev); 929 struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev);
930 930
931 return sprintf(buf, "0x%04x\n", be16_to_cpu(dcr->code)); 931 return sprintf(buf, "0x%04x\n", le16_to_cpu(dcr->code));
932} 932}
933static DEVICE_ATTR_RO(format); 933static DEVICE_ATTR_RO(format);
934 934
@@ -961,8 +961,8 @@ static ssize_t format1_show(struct device *dev,
961 continue; 961 continue;
962 if (nfit_dcr->dcr->code == dcr->code) 962 if (nfit_dcr->dcr->code == dcr->code)
963 continue; 963 continue;
964 rc = sprintf(buf, "%#x\n", 964 rc = sprintf(buf, "0x%04x\n",
965 be16_to_cpu(nfit_dcr->dcr->code)); 965 le16_to_cpu(nfit_dcr->dcr->code));
966 break; 966 break;
967 } 967 }
968 if (rc != ENXIO) 968 if (rc != ENXIO)
diff --git a/drivers/acpi/nfit.h b/drivers/acpi/nfit.h
index 11cb38348aef..02b9ea1e8d2e 100644
--- a/drivers/acpi/nfit.h
+++ b/drivers/acpi/nfit.h
@@ -53,12 +53,12 @@ enum nfit_uuids {
53}; 53};
54 54
55/* 55/*
56 * Region format interface codes are stored as an array of bytes in the 56 * Region format interface codes are stored with the interface as the
57 * NFIT DIMM Control Region structure 57 * LSB and the function as the MSB.
58 */ 58 */
59#define NFIT_FIC_BYTE cpu_to_be16(0x101) /* byte-addressable energy backed */ 59#define NFIT_FIC_BYTE cpu_to_le16(0x101) /* byte-addressable energy backed */
60#define NFIT_FIC_BLK cpu_to_be16(0x201) /* block-addressable non-energy backed */ 60#define NFIT_FIC_BLK cpu_to_le16(0x201) /* block-addressable non-energy backed */
61#define NFIT_FIC_BYTEN cpu_to_be16(0x301) /* byte-addressable non-energy backed */ 61#define NFIT_FIC_BYTEN cpu_to_le16(0x301) /* byte-addressable non-energy backed */
62 62
63enum { 63enum {
64 NFIT_BLK_READ_FLUSH = 1, 64 NFIT_BLK_READ_FLUSH = 1,