From patchwork Mon Jul 20 10:06:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 6826251 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C79679F38B for ; Mon, 20 Jul 2015 10:03:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0DAC720670 for ; Mon, 20 Jul 2015 10:03:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0596120671 for ; Mon, 20 Jul 2015 10:03:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932385AbbGTKDQ (ORCPT ); Mon, 20 Jul 2015 06:03:16 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:34254 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932305AbbGTKDO (ORCPT ); Mon, 20 Jul 2015 06:03:14 -0400 Received: by pdbbh15 with SMTP id bh15so54155420pdb.1; Mon, 20 Jul 2015 03:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=R7tEE9xJ51YzxjWhTtnMXOGdmMISWkElBsGILUhxd3Y=; b=Wd0c8rmFLiNJxsC9eNgLVi4icfkFTaJSJ0AAOHhoI5aoNKI4s0E4qYIv4JKdlxw38w DjOri8dx9Fg6NsRnJawdD4hYlCM8bz5ysV+cqr3vamX+lUDtbvmI+VySCEF3GfdBUi/M YbSp/ej4AWTOhwdvdwNjXbhUoiBaIe44+781l+3+8+6p7ozO6RDgSMyf5DmMGWC/jE1P Bvye0h/i+UPiw7ciQzOmcw6+5ndClkqI0V6MGmSyGiVof56HLb9EvbpFFBk1HwW3+xV2 cEb3ITHNBltl5HlqJH8u3G8FBx5g/8ZuePhZR8u+W9cIssjvNtoPSruehfOqtYWKIJn1 92+w== X-Received: by 10.66.190.228 with SMTP id gt4mr58938905pac.72.1437386593456; Mon, 20 Jul 2015 03:03:13 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by smtp.gmail.com with ESMTPSA id pa1sm20793404pdb.73.2015.07.20.03.03.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jul 2015 03:03:11 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: jason@lakedaemon.net, geert+renesas@glider.be, linux-kernel@vger.kernel.org, horms@verge.net.au, Magnus Damm , tglx@linutronix.de Date: Mon, 20 Jul 2015 19:06:35 +0900 Message-Id: <20150720100635.2552.20906.sendpatchset@little-apple> In-Reply-To: <20150720100602.2552.85507.sendpatchset@little-apple> References: <20150720100602.2552.85507.sendpatchset@little-apple> Subject: [PATCH 03/03] irqchip: renesas-irqc: Make use of irq_find_mapping() Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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: Magnus Damm 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 --- drivers/irqchip/irq-renesas-irqc.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0003/drivers/irqchip/irq-renesas-irqc.c +++ work/drivers/irqchip/irq-renesas-irqc.c 2015-07-20 17:59:13.000000000 +0900 @@ -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 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 ir { 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_de break; p->irq[k].p = p; + p->irq[k].hw_irq = k; p->irq[k].requested_irq = irq->start; }