From patchwork Sat Nov 2 15:39:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 3130781 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 857049F440 for ; Sat, 2 Nov 2013 15:40:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AB83B203F4 for ; Sat, 2 Nov 2013 15:40:52 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D268A203C4 for ; Sat, 2 Nov 2013 15:40:50 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VcdJN-0008Hl-0C; Sat, 02 Nov 2013 15:40:29 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VcdJK-0001t9-9D; Sat, 02 Nov 2013 15:40:26 +0000 Received: from mail-pb0-x22b.google.com ([2607:f8b0:400e:c01::22b]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VcdJH-0001s7-8r for linux-arm-kernel@lists.infradead.org; Sat, 02 Nov 2013 15:40:24 +0000 Received: by mail-pb0-f43.google.com with SMTP id md4so5493221pbc.30 for ; Sat, 02 Nov 2013 08:40:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KBDiR7CZGU3jNfUkXrrtzRL4Yw86OjKUJrMaV4xpE68=; b=CIr6knmmupRvFB71QtfXeGt4ly37krxTjCYZmPn4JxqIgQROztXN3eH5gVa2PfuCx5 bJ3Kwg7vgSY/rXacmh44HQA9hEw/4tcmkHcMdOkSA889qYE7GJxTB+CJF+9rhquq3z7b fjHooaiXvHJHB/pEmW1Xo3EGVHZP64vyQC0BlE+B7FUvwxjuVdzgs41WYLUC+drQM5UO mxFyboz2JmH2hq2pXz1AtAoTbux7L69XCcSxyl3BOfMv9PrXLquXUoVK80qQiaHG3Jna s8eZxqdjKbVZZ+5gafziVQpDFZtDgbepSy/HI14sNPL94LoTJVFGRL4sf/DiyYRkILaj dalg== X-Received: by 10.66.119.78 with SMTP id ks14mr8611520pab.140.1383406801568; Sat, 02 Nov 2013 08:40:01 -0700 (PDT) Received: from localhost.localdomain ([49.200.27.40]) by mx.google.com with ESMTPSA id qp10sm20456849pab.13.2013.11.02.08.39.53 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 02 Nov 2013 08:40:00 -0700 (PDT) From: "Lad, Prabhakar" To: Sekhar Nori , Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH v4 1/6] gpio: davinci: Fixed a check for unbanked gpio Date: Sat, 2 Nov 2013 21:09:30 +0530 Message-Id: <1383406775-14902-2-git-send-email-prabhakar.csenng@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1383406775-14902-1-git-send-email-prabhakar.csenng@gmail.com> References: <1383406775-14902-1-git-send-email-prabhakar.csenng@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131102_114023_444198_8E124403 X-CRM114-Status: GOOD ( 13.07 ) X-Spam-Score: -2.0 (--) Cc: Mark Rutland , Alex Elder , davinci-linux-open-source@linux.davincidsp.com, Grygorii Strashko , Russell King , Pawel Moll , Ian Campbell , Stephen Warren , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , linux-gpio@vger.kernel.org, Lad Prabhakar , Rob Landley , Grant Likely , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Lad, Prabhakar" This patch fixes the check for the offset in gpio_to_irq_unbanked() function. Signed-off-by: Lad, Prabhakar Acked-by: Linus Walleij --- drivers/gpio/gpio-davinci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index 8847adf..6c90cfb 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -327,7 +327,7 @@ static int gpio_to_irq_unbanked(struct gpio_chip *chip, unsigned offset) * NOTE: we assume for now that only irqs in the first gpio_chip * can provide direct-mapped IRQs to AINTC (up to 32 GPIOs). */ - if (offset < d->irq_base) + if (offset < d->gpio_unbanked) return d->gpio_irq + offset; else return -ENODEV;