From patchwork Wed Mar 23 13:17:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 104972 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp23838lbc; Wed, 23 Mar 2016 06:18:30 -0700 (PDT) X-Received: by 10.66.141.134 with SMTP id ro6mr4075896pab.111.1458739110353; Wed, 23 Mar 2016 06:18:30 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 14si4361164pfk.156.2016.03.23.06.18.29; Wed, 23 Mar 2016 06:18:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932192AbcCWNST (ORCPT + 29 others); 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 Received: from debutante.sirena.org.uk ([2a01:348:6:8808:fab::3] helo=debutante) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1aiifk-0007hn-3K; Wed, 23 Mar 2016 13:18:05 +0000 Received: from broonie by debutante with local (Exim 4.86) (envelope-from ) id 1aiifg-00033b-7p; Wed, 23 Mar 2016 13:18:00 +0000 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mezzanine.sirena.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.7.0 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