summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-03-23 15:13:12 +0300
committerMark Brown <broonie@kernel.org>2016-03-23 16:41:06 +0300
commit9f9f8b863ad130ec0c25f378bdbad64ba71291de (patch)
treea7644b29d5bbfcfdb5e71ea0f23f23488ec86644 /drivers/base
parentd25263d917caadba52275bf95c9b3400fe77edbe (diff)
downloadlinux-9f9f8b863ad130ec0c25f378bdbad64ba71291de.tar.xz
regmap: mmio: Fix value endianness selection
Currently when selecting value endianness we check the register endiannes, not the value endianness. Reported-by: Alexander Stein <alexander.stein@systec-electronic.com> Tested-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap-mmio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap-mmio.c b/drivers/base/regmap/regmap-mmio.c
index 7526906ca080..b27573c69af7 100644
--- a/drivers/base/regmap/regmap-mmio.c
+++ b/drivers/base/regmap/regmap-mmio.c
@@ -245,7 +245,7 @@ static struct regmap_mmio_context *regmap_mmio_gen_context(struct device *dev,
ctx->val_bytes = config->val_bits / 8;
ctx->clk = ERR_PTR(-ENODEV);
- switch (config->reg_format_endian) {
+ switch (config->val_format_endian) {
case REGMAP_ENDIAN_DEFAULT:
case REGMAP_ENDIAN_LITTLE:
#ifdef __LITTLE_ENDIAN