From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932225AbbGTLWY (ORCPT ); Mon, 20 Jul 2015 07:22:24 -0400 Received: from terminus.zytor.com ([198.137.202.10]:55982 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932144AbbGTLWW (ORCPT ); Mon, 20 Jul 2015 07:22:22 -0400 Date: Mon, 20 Jul 2015 04:22:09 -0700 From: tip-bot for Magnus Damm Message-ID: Cc: damm+renesas@opensource.se, tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, magnus.damm@gmail.com Reply-To: hpa@zytor.com, magnus.damm@gmail.com, tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, damm+renesas@opensource.se In-Reply-To: <20150720100635.2552.20906.sendpatchset@little-apple> References: <20150720100635.2552.20906.sendpatchset@little-apple> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] irqchip/renesas-irqc: Make use of irq_find_mapping () Git-Commit-ID: e10fc03c4f89e5191f0ad2a3885d476f498bf131 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: e10fc03c4f89e5191f0ad2a3885d476f498bf131 Gitweb: http://git.kernel.org/tip/e10fc03c4f89e5191f0ad2a3885d476f498bf131 Author: Magnus Damm AuthorDate: Mon, 20 Jul 2015 19:06:35 +0900 Committer: Thomas Gleixner CommitDate: Mon, 20 Jul 2015 13:19:00 +0200 irqchip/renesas-irqc: Make use of irq_find_mapping() Instead of locally caching the virq as domain_irq simply rely on the IRQ domain code and irq_find_mapping(). This reduces the delta between the IRQC driver and the generic chip implementation. Signed-off-by: Magnus Damm Cc: jason@lakedaemon.net Cc: geert+renesas@glider.be Cc: horms@verge.net.au Cc: Magnus Damm Link: http://lkml.kernel.org/r/20150720100635.2552.20906.sendpatchset@little-apple Signed-off-by: Thomas Gleixner --- drivers/irqchip/irq-renesas-irqc.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c index 7f75092..2aa3add 100644 --- a/drivers/irqchip/irq-renesas-irqc.c +++ b/drivers/irqchip/irq-renesas-irqc.c @@ -53,7 +53,6 @@ struct irqc_irq { int hw_irq; int requested_irq; - int domain_irq; struct irqc_priv *p; }; @@ -70,8 +69,8 @@ struct irqc_priv { static void irqc_dbg(struct irqc_irq *i, char *str) { - dev_dbg(&i->p->pdev->dev, "%s (%d:%d:%d)\n", - str, i->requested_irq, i->hw_irq, i->domain_irq); + dev_dbg(&i->p->pdev->dev, "%s (%d:%d)\n", + str, i->requested_irq, i->hw_irq); } static void irqc_irq_enable(struct irq_data *d) @@ -145,7 +144,7 @@ static irqreturn_t irqc_irq_handler(int irq, void *dev_id) if (ioread32(p->iomem + DETECT_STATUS) & bit) { iowrite32(bit, p->iomem + DETECT_STATUS); irqc_dbg(i, "demux2"); - generic_handle_irq(i->domain_irq); + generic_handle_irq(irq_find_mapping(p->irq_domain, i->hw_irq)); return IRQ_HANDLED; } return IRQ_NONE; @@ -156,9 +155,6 @@ static int irqc_irq_domain_map(struct irq_domain *h, unsigned int virq, { struct irqc_priv *p = h->host_data; - p->irq[hw].domain_irq = virq; - p->irq[hw].hw_irq = hw; - irqc_dbg(&p->irq[hw], "map"); irq_set_chip_data(virq, h->host_data); irq_set_chip_and_handler(virq, &p->irq_chip, handle_level_irq); @@ -214,6 +210,7 @@ static int irqc_probe(struct platform_device *pdev) break; p->irq[k].p = p; + p->irq[k].hw_irq = k; p->irq[k].requested_irq = irq->start; }