From patchwork Thu Sep 27 13:13:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11761 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 86ED523EFD for ; Thu, 27 Sep 2012 13:14:35 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 16F59A18780 for ; Thu, 27 Sep 2012 13:14:34 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so4106142iej.11 for ; Thu, 27 Sep 2012 06:14:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=BHqWitO9tSmG0Gz7R6jQcFHQH7WwOp4cSBSpaEXRc1s=; b=g9ejcQy+IwWYnrHmVNFmkEbfp3wpLeQ4aRwuej+zJcCjmA44wvlw2aYcHeQE7e/BnN YrkgoF0jrciWjT3kCAwlvvPogBnBZibiHMVQNE+zqJKf8agUZTXm1Qx6zqj/aa4apDgi viC+oLXjMBuXCMwBehlvWx443eGWXkCp5DDW4Wcos6hqzSh7FcI6oTFg/RUnxFMsxUC/ ItHekiwfR7PL0FV770T7ttmTAMZ8ecq4s0m/+bko8nndRoljFwdCwHD1wuI7kMGnw8I0 oUEq1IFEqp4M10/IsqIJZgHqKOCo1h16IB09rAXnK7h4A1wQGAv725gpKg4Ow9896f0o 0R6A== Received: by 10.50.160.165 with SMTP id xl5mr4702934igb.0.1348751674865; Thu, 27 Sep 2012 06:14:34 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp414855igc; Thu, 27 Sep 2012 06:14:34 -0700 (PDT) Received: by 10.14.172.193 with SMTP id t41mr5843766eel.25.1348751673483; Thu, 27 Sep 2012 06:14:33 -0700 (PDT) Received: from eu1sys200aog116.obsmtp.com (eu1sys200aog116.obsmtp.com [207.126.144.141]) by mx.google.com with SMTP id m5si5180708een.63.2012.09.27.06.14.18 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Sep 2012 06:14:33 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.141 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.141; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.141 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob116.postini.com ([207.126.147.11]) with SMTP ID DSNKUGRRKNDinC9Grvzeg4W/BE8OZhso7v1r@postini.com; Thu, 27 Sep 2012 13:14:33 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 6B88764; Thu, 27 Sep 2012 13:13:09 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 89BE461; Thu, 27 Sep 2012 09:02:32 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id BAC2C24C2F1; Thu, 27 Sep 2012 15:13:32 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Thu, 27 Sep 2012 15:13:39 +0200 From: Linus Walleij To: , Cc: Stephen Warren , Anmar Oueja , Linus Walleij , Lee Jones , Rob Herring Subject: [PATCH 1/4] pinctrl/nomadik: use irq_find_mapping() Date: Thu, 27 Sep 2012 15:13:35 +0200 Message-ID: <1348751615-17379-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmkUuGIrDJXHXmc/P6G7EdV3is2/4enwfD44yYegLxwd21EVvcKBnolpoZmvd9vi380KpPA From: Linus Walleij The code was using a homegrown method of looking up the offset from the irq domain, not to be encouraged. Use the proper irq_find_mapping() call instead. Cc: Lee Jones Cc: Rob Herring Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-nomadik.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index 3dde653..e031c84 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@ -826,16 +826,14 @@ static void __nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc, { struct nmk_gpio_chip *nmk_chip; struct irq_chip *host_chip = irq_get_chip(irq); - unsigned int first_irq; chained_irq_enter(host_chip, desc); nmk_chip = irq_get_handler_data(irq); - first_irq = nmk_chip->domain->revmap_data.legacy.first_irq; while (status) { int bit = __ffs(status); - generic_handle_irq(first_irq + bit); + generic_handle_irq(irq_find_mapping(nmk_chip->domain, bit)); status &= ~BIT(bit); }