Received: by 10.192.165.148 with SMTP id m20csp288165imm; Fri, 20 Apr 2018 06:52:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/+3pD3Usw0awtR2uwN7WNOKyBLe8j4dIVc4TdvT1RQTkqBHSQ3nveZMcfyIkVutvlnJleJ X-Received: by 2002:a17:902:d20a:: with SMTP id t10-v6mr10368476ply.151.1524232329295; Fri, 20 Apr 2018 06:52:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524232329; cv=none; d=google.com; s=arc-20160816; b=ZKbthvwBxJrsoXJS+J0fLeklk1ciAGVk6Z0r2r40mYb5AV+U8UggpXL+vUjrrU+Pnp UTbhJK0+cwsMgU3qqOzybj0DClyNGifLbVONsQdjV0RQfM2DJ/zKrRBZXfgoeJuvr46u dYRxBYBBnITK9uJfim6nLe+ulzEn6D1dfdzu4GIsDS0nhJE+xSekufDIOMQC1ef0L33/ g76vu5IyVxQNnjLgTzS8ZUuebU7GXJRMa8ll+fZvOfaGzZgaphCI/Zq08lJ7tv9BmX4P fREjU9OyCizPb+YF98iXsSqmLOu9adH7HCY6XJezyEZfPSbtSRpG+9C6FDSXOH/pYXDR YtYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=F3fxVUT8Jz+N6I/gCfKHG2oa4Dqh+yiA3r+hFZkwFJM=; b=gyURakILeq2W3lwiw/b34i6bRLjh3kVzD5DOXqWBih52YOg/Lt12MiDUyeQu7TzTky qRc6RB+PJjVAbuiLK8oQQAfQ6EjSUZ3m9iBAREVUXUemvhmf3rx93/g8YxDPkKe3saxZ GK8ZaCcmb25qyN2At9SuomelugANVAyI+Sec3biCWtD9jg1PerSAx5hAcg8CEXUX16Kr EVdh+3jfKGP67YmGo8mH7sBKURLYdzyzE48aF/K+EYztOX21jzVBtwI66ZyNCRPvdCwl /CMAsDdxJF6cVbelHPIkO/pi/RtPw+En2wfvk8sXOHkoVk1gD9Wn/MW2epNXHBMAClHy 8V6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bZRwGOaG; 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 94-v6si5748642ple.56.2018.04.20.06.51.54; Fri, 20 Apr 2018 06:52:09 -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=bZRwGOaG; 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 S1755134AbeDTNuk (ORCPT + 99 others); Fri, 20 Apr 2018 09:50:40 -0400 Received: from mail-yb0-f194.google.com ([209.85.213.194]:39516 "EHLO mail-yb0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754953AbeDTNuj (ORCPT ); Fri, 20 Apr 2018 09:50:39 -0400 Received: by mail-yb0-f194.google.com with SMTP id q74-v6so3026360ybg.6; Fri, 20 Apr 2018 06:50:38 -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; bh=F3fxVUT8Jz+N6I/gCfKHG2oa4Dqh+yiA3r+hFZkwFJM=; b=bZRwGOaGv/XNnA6JuAD7hvFXqMQabkOLuub6/gdVVtapRZNiO0pQW4Q3iB0ewsq1+d 9nZPbnMDglRNG2R9Erknknsra8X2NCN59d2+f3tar1FjBXw5IFtu6fkjrRyyn1rTydO7 ERv2ulVK7RKEZ0tVf4lTVEclzARyNYA1NV0IIT7LD+roxHDik3sYTSYAIV0qI6MSd0nZ KCZBHhxsIUTByryl1NkBvs7wwA7vTgjE++oSYrrPPP0gjSx2y/4s0B/1yvSx/Icrxc0c AOCAQPLvVfAMpee0BWUDxpf1M/algNOLXfgdsWdUmrTFaVepcaQ4jY6wEcJdGamZDG/I 6gWw== 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; bh=F3fxVUT8Jz+N6I/gCfKHG2oa4Dqh+yiA3r+hFZkwFJM=; b=K/A1kozLK/2YIVR0EktNOeVd6FX4kYf90IqfYK0yDdwfIDT+cMDg1tk0io4TS2LyFi lCsJv/IbnhNxyoiRpeJ0KAg3cvQQr9cQQ8fjwp/EA/RbJXnmlkgS2jpn15LP/Nvwp9j0 VP8zQktiXGfr2G8qCO/JSfbWMaw2Br+oicXthb/ZvuIRmbTfFYnFzY3wubeQAKvkge7J qGADEILRNGmAs3NdAvFKoOsRoqVhpP9OWHflzxiOAAvwo0dRCURGv56StHNurkA/Zfis lWwIAQO/2hnmq040pffGd+h+jHFdmH+r07XEXf7OPGsaJQWn8B/yUZ5Tq71c+96k7xV6 pnOA== X-Gm-Message-State: ALQs6tCm5SULRqoLH/MrXXY7XQQgPsD0mY2z49EtsZ6QK1aEop3ThZD1 BxkXoJS3YQ2lwg2djT5feAM= X-Received: by 2002:a25:e908:: with SMTP id n8-v6mr6325887ybd.83.1524232238480; Fri, 20 Apr 2018 06:50:38 -0700 (PDT) Received: from localhost ([72.188.97.40]) by smtp.gmail.com with ESMTPSA id f2-v6sm2512930ywe.6.2018.04.20.06.50.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Apr 2018 06:50:37 -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] gpio: pcie-idio-24: Fix off-by-one error in get_multiple loop Date: Fri, 20 Apr 2018 09:50:20 -0400 Message-Id: <20180420135020.23423-1-vilhelm.gray@gmail.com> X-Mailer: git-send-email 2.16.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The PCIe-IDIO-24 features 8 bits of TTL GPIO which may be configured for output or input. This patch fixes an off-by-one error in the loop conditional for the get_multiple callback so that the TTL GPIO are handled. Fixes: ca37081595a2 ("gpio: pcie-idio-24: Implement get_multiple/set_multiple callbacks") Signed-off-by: William Breathitt Gray --- drivers/gpio/gpio-pcie-idio-24.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-pcie-idio-24.c b/drivers/gpio/gpio-pcie-idio-24.c index 835607ecf658..32bcbd9a52aa 100644 --- a/drivers/gpio/gpio-pcie-idio-24.c +++ b/drivers/gpio/gpio-pcie-idio-24.c @@ -217,7 +217,7 @@ static int idio_24_gpio_get_multiple(struct gpio_chip *chip, bitmap_zero(bits, chip->ngpio); /* get bits are evaluated a gpio port register at a time */ - for (i = 0; i < ARRAY_SIZE(ports); i++) { + for (i = 0; i < ARRAY_SIZE(ports) + 1; i++) { /* gpio offset in bits array */ bits_offset = i * gpio_reg_size; -- 2.16.2