Received: by 10.192.165.156 with SMTP id m28csp1197456imm; Wed, 18 Apr 2018 05:56:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+Z+gelkWLIjYydWZjEd0U3gP7VsY13opWj8JW22ScQ5buS14PzZAwINANXQxvDO+2PThnw X-Received: by 2002:a17:902:5222:: with SMTP id z31-v6mr1995437plh.223.1524056170746; Wed, 18 Apr 2018 05:56:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524056170; cv=none; d=google.com; s=arc-20160816; b=fcY83jErDeq5txgOUOkYAXdmxlRh6Q78GH/M3e2CxDhR/XeLAzkzLb/jKmODuHPr2j sG7iqyOJEs7XteNNzJDQeAGGEKDrRAwl1y+vbT+yJC6ADPHSu9rgDQvC8tcGMJFUOa6q Men7gwEsJhr+kOsfTGEmfOmXB+po0wZwgRb0wdQ8END82wAIBex6iA0GjoerGz2s3j3a 7Dz+TW+/N6V+D5bctiuWa+hv9hRBwGpAWgXGyYiM6u9a/viSQ+2nuEWvGGc5GTGAHsyh 0g92oBmrlUiH6HvTwi9kG9VlOKfjk2AENF2kH/Xww2XtmZ63mZ/aSfJrSFhSeryuw61K FR1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=iUiGX/lWLPB3DEJZevaQ+z43vAtBGDLH8Doy6WczvgQ=; b=QasT6mmJQgoRp/hoijgwiLzbkyyP6bvek74SYgfIid1hOYGnJlqBPqHLrURf2I27F4 cmU8iqB4O2xT0XM3LpjMa8Mss+0xIe1dJDNBETfOsTkFQ5XslPTEbvTeMfHcHptm2yLL yu/TjRiD8RxzdF3j43grZJX4ehEEOSOwMTVHKLN5FFlGop8Bz1xnoGo+sMICyN2ZrG/W 5u+Uz/TtAoapK8QhS7hM9QqTaKTio4oqxQ0Na8eCUVrgO2DgOSN0cYGQyP/gxt8GsY7o e2iVfp5E2sFCglSR+EAHSSi9n7nnKVsbAsBEjmT63UW2ndW/eTEwQ9Luzfqvcr3svQgc RFhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZUk7BNW7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si1084876pga.86.2018.04.18.05.55.45; Wed, 18 Apr 2018 05:56:10 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZUk7BNW7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753981AbeDRMxT (ORCPT + 99 others); Wed, 18 Apr 2018 08:53:19 -0400 Received: from mail-yw0-f196.google.com ([209.85.161.196]:45112 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753917AbeDRMxR (ORCPT ); Wed, 18 Apr 2018 08:53:17 -0400 Received: by mail-yw0-f196.google.com with SMTP id g9-v6so458181ywb.12; Wed, 18 Apr 2018 05:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iUiGX/lWLPB3DEJZevaQ+z43vAtBGDLH8Doy6WczvgQ=; b=ZUk7BNW7Y5z0M2TDzAdvtk/QsdjO6xC5vRlNoShK8yR2HXvFDLYjTL/zbco/dWboeV FLb5ATTo6v2twWcuGTYEcYrIwedOKEPd7q4zSnpyrCp73iMYB5pmkVyBrGnb1khYhvUh 8eBfiQGFWIMsh1v/hnWxP6HqxyU8VZl+YvtypybdSKP65TzULWg48++RGg1thJT+t3M2 Jyms90KsPId5jO48qccH2RqWXr0HDiYuipxdEFalbnsKwdHod6CFTYsCZBq7DlhNc3lF BRLSqNWxNljF9xRPXreg/DXNgXd4pW1BrQu/cr5UIApbnJ8trz6aEZcxPbhAYuIeCBKR MvRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iUiGX/lWLPB3DEJZevaQ+z43vAtBGDLH8Doy6WczvgQ=; b=fx3QQEJbXMu+SB2bLy69Ukosvn3DRdwdSIO9yalMaXe5N84G2po/kK2o5ZVpXYsCXO 61Od5hPV+Jh3GWWyq5u6sL7QEzgJduoTlDfqT2pCfOwOD4arIk/p3asHTbaQJPcQyHqW VZDi5dkvNzQVLG9WmY1JkVbroxdFcCUATyzQ8JQmrZrdGAUw2MvuGi28l2Kd3vvRjxXV NefbDeEPnO1ZcKo5/D3c5UObqZzPNzgnKp0GhwWY5zvtAkvN+1x9XQlP0ThfsFOrHIoa wzH1AlMZTG5LYzIBLzIzaL9YtA8tCx8LivajFqS0o7i4kmri8tUBYTao5ZUzIYlzrB0+ aB+Q== X-Gm-Message-State: ALQs6tAmcjUMEMdQeijqFFrHiqza+78QqohgWo45exOe8P9zgZlmEcRZ BO3K78BZhgcYKrXNLNNcg0s= X-Received: by 2002:a81:3612:: with SMTP id d18-v6mr553447ywa.381.1524055996632; Wed, 18 Apr 2018 05:53:16 -0700 (PDT) Received: from localhost ([72.188.97.40]) by smtp.gmail.com with ESMTPSA id g136-v6sm402107ywb.67.2018.04.18.05.53.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Apr 2018 05:53:16 -0700 (PDT) From: William Breathitt Gray To: linus.walleij@linaro.org Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, William Breathitt Gray Subject: [PATCH 1/2] gpio: pci-idio-16: Fix port memory offset for get_multiple callback Date: Wed, 18 Apr 2018 08:53:10 -0400 Message-Id: <8d1e6c1c2b04815928fab78e1e2984b18ae516f4.1524000042.git.vilhelm.gray@gmail.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ioread8 function expects a memory offset argument. This patch fixes the ports array to provide the memory addresses of the respective device I/O registers. Fixes: 810ebfc5efca ("gpio: pci-idio-16: Implement get_multiple callback") Signed-off-by: William Breathitt Gray --- drivers/gpio/gpio-pci-idio-16.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-pci-idio-16.c b/drivers/gpio/gpio-pci-idio-16.c index 1948724d8c36..25d16b2af1c3 100644 --- a/drivers/gpio/gpio-pci-idio-16.c +++ b/drivers/gpio/gpio-pci-idio-16.c @@ -116,9 +116,9 @@ static int idio_16_gpio_get_multiple(struct gpio_chip *chip, unsigned long word_mask; const unsigned long port_mask = GENMASK(gpio_reg_size - 1, 0); unsigned long port_state; - u8 __iomem ports[] = { - idio16gpio->reg->out0_7, idio16gpio->reg->out8_15, - idio16gpio->reg->in0_7, idio16gpio->reg->in8_15, + void __iomem *ports[] = { + &idio16gpio->reg->out0_7, &idio16gpio->reg->out8_15, + &idio16gpio->reg->in0_7, &idio16gpio->reg->in8_15, }; /* clear bits array to a clean slate */ @@ -143,7 +143,7 @@ static int idio_16_gpio_get_multiple(struct gpio_chip *chip, } /* read bits from current gpio port */ - port_state = ioread8(ports + i); + port_state = ioread8(ports[i]); /* store acquired bits at respective bits array offset */ bits[word_index] |= port_state << word_offset; -- 2.16.2