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: 3130831 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id ECD67BEEB2 for ; Sat, 2 Nov 2013 15:41:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 169AD20258 for ; Sat, 2 Nov 2013 15:41:42 +0000 (UTC) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2435B201B7 for ; Sat, 2 Nov 2013 15:41:41 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id rA2FeRQl008120; Sat, 2 Nov 2013 10:40:28 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id rA2FeN7l016459; Sat, 2 Nov 2013 10:40:26 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Sat, 2 Nov 2013 10:40:22 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id rA2FeLjO028352; Sat, 2 Nov 2013 10:40:21 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 51C1F8062A; Sat, 2 Nov 2013 09:40:21 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id 28D0F80627 for ; Sat, 2 Nov 2013 09:40:05 -0600 (CST) Received: from red.ext.ti.com (red.ext.ti.com [192.94.93.37]) by dflp52.itg.ti.com (8.13.7/8.13.8) with ESMTP id rA2Fe3cR014794 for ; Sat, 2 Nov 2013 10:40:03 -0500 (CDT) Received: from mail6.bemta8.messagelabs.com (mail6.bemta8.messagelabs.com [216.82.243.55]) by red.ext.ti.com (8.13.7/8.13.7) with ESMTP id rA2Fe3E2016321 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 2 Nov 2013 10:40:03 -0500 Received: from [216.82.242.131:52809] by server-10.bemta-8.messagelabs.com id BE/D2-02749-3DC15725; Sat, 02 Nov 2013 15:40:03 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-12.tower-76.messagelabs.com!1383406801!24490760!1 X-Originating-IP: [209.85.160.49] X-SpamReason: No, hits=0.0 required=7.0 tests=ML_RADAR_SPEW_LINKS_14, spamassassin: X-StarScan-Received: X-StarScan-Version: 6.9.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 17022 invoked from network); 2 Nov 2013 15:40:02 -0000 Received: from mail-pb0-f49.google.com (HELO mail-pb0-f49.google.com) (209.85.160.49) by server-12.tower-76.messagelabs.com with RC4-SHA encrypted SMTP; 2 Nov 2013 15:40:02 -0000 Received: by mail-pb0-f49.google.com with SMTP id xb4so5420341pbc.8 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 , 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> CC: Mark Rutland , Alex Elder , , Russell King , Pawel Moll , Ian Campbell , Stephen Warren , , , Rob Herring , , Rob Landley , Grant Likely , X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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;