Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932190AbcCWNST (ORCPT ); Wed, 23 Mar 2016 09:18:19 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:58818 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754652AbcCWNSJ (ORCPT ); Wed, 23 Mar 2016 09:18:09 -0400 From: Mark Brown To: Alexander Stein Cc: linux-kernel@vger.kernel.org, Mark Brown Date: Wed, 23 Mar 2016 13:17:59 +0000 Message-Id: <1458739079-11712-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.7.0 X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: [PATCH] regmap: mmio: Fix value endianness selection X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 859 Lines: 24 Currently when selecting value endianness we check the register endiannes, not the value endianness. Reported-by: Alexander Stein Signed-off-by: Mark Brown --- drivers/base/regmap/regmap-mmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.7.0