From patchwork Fri Oct 19 15:09: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: 12379 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 0BF9623F9B for ; Fri, 19 Oct 2012 15:09:59 +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 AAC76A187EB for ; Fri, 19 Oct 2012 15:09:58 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so726748iej.11 for ; Fri, 19 Oct 2012 08:09:58 -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=ah19tySIfB7GyCptixNhK67CSEvP3yoUILRiZTBHIgc=; b=EJMJfDZePN9MWvuAvh/JM9VyxINtXysmRD05mxcqT7UC8UO+Ufry1UAfNAJzZuZwir g2tIYxgX1U9/AqZNJXdiK/K3Z7MrTqjpOYV89FmMjFtGgQ+FCVYDXFEmzdqI8O+gouZJ cOxQ5sO5pFtTJZEyzT3HVXOW8o3G3tl01Rs9ibQ3pN+oedj4086ODEr1Aqmi4YJmnDI6 xkQbTG+e4COytWjqGapat/2Myahc29kBbDITOJcchQQjpZQiJsQU2WBY5Jqjg81d/GXX MPhMwNx0vHuZ7nWLsFtLIcPMasrOw7ySXHhsIP/ev7BvR5VpLxwml7uD2a4j2VTz1wyP JDBA== Received: by 10.50.161.169 with SMTP id xt9mr8606960igb.62.1350659398139; Fri, 19 Oct 2012 08:09:58 -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.67.148 with SMTP id n20csp104428igt; Fri, 19 Oct 2012 08:09:57 -0700 (PDT) Received: by 10.14.220.71 with SMTP id n47mr2333365eep.26.1350659396300; Fri, 19 Oct 2012 08:09:56 -0700 (PDT) Received: from eu1sys200aog101.obsmtp.com (eu1sys200aog101.obsmtp.com [207.126.144.111]) by mx.google.com with SMTP id q5si1504008eep.57.2012.10.19.08.09.47 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Oct 2012 08:09:56 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.111 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.111; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.111 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-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob101.postini.com ([207.126.147.11]) with SMTP ID DSNKUIFtOmtrs/CPGOgramFqQ/6NPvtNNZuv@postini.com; Fri, 19 Oct 2012 15:09:55 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 2315494; Fri, 19 Oct 2012 15:01:30 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id E7734111D; Fri, 19 Oct 2012 15:09:42 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 16C3BA8081; Fri, 19 Oct 2012 17:09:36 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Fri, 19 Oct 2012 17:09:41 +0200 From: Linus Walleij To: , Cc: Stephen Warren , Anmar Oueja , Linus Walleij , Lee Jones Subject: [PATCH] pinctrl/nomadik: use irq_create_mapping() Date: Fri, 19 Oct 2012 17:09:35 +0200 Message-ID: <1350659375-7335-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: ALoCoQkqqP21tEXSnacle+jg6tmETlKlEiat9iykIutXWx2Gas80xQzi9nW2N3TAMNY1Y5fMWkNQ From: Linus Walleij Since in the DT case, the linear domain path will not allocate descriptors for the IRQs, we need to use irq_create_mapping() for mapping hwirqs to Linux IRQs, so these descriptors get created on-the-fly in this case. Cc: Lee Jones Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-nomadik.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index 01aea1c..d1d3cb9 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@ -931,7 +931,7 @@ static void __nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc, while (status) { int bit = __ffs(status); - generic_handle_irq(irq_find_mapping(nmk_chip->domain, bit)); + generic_handle_irq(irq_create_mapping(nmk_chip->domain, bit)); status &= ~BIT(bit); } @@ -1056,7 +1056,7 @@ static int nmk_gpio_to_irq(struct gpio_chip *chip, unsigned offset) struct nmk_gpio_chip *nmk_chip = container_of(chip, struct nmk_gpio_chip, chip); - return irq_find_mapping(nmk_chip->domain, offset); + return irq_create_mapping(nmk_chip->domain, offset); } #ifdef CONFIG_DEBUG_FS