public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
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 <magnus.damm@gmail.com>,
	tglx@linutronix.de
Subject: [PATCH 03/03] irqchip: renesas-irqc: Make use of irq_find_mapping()
Date: Mon, 20 Jul 2015 19:06:35 +0900	[thread overview]
Message-ID: <20150720100635.2552.20906.sendpatchset@little-apple> (raw)
In-Reply-To: <20150720100602.2552.85507.sendpatchset@little-apple>

From: Magnus Damm <damm+renesas@opensource.se>

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 <damm+renesas@opensource.se>
---

 drivers/irqchip/irq-renesas-irqc.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

--- 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;
 	}
 

  parent reply	other threads:[~2015-07-20 10:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-20 10:06 [PATCH 00/03] irqchip: renesas-irqc: Minor update Magnus Damm
2015-07-20 10:06 ` [PATCH 01/03] irqchip: renesas-irqc: Get rid of IRQF_VALID Magnus Damm
2015-07-20 11:21   ` [tip:irq/core] irqchip/renesas-irqc: " tip-bot for Magnus Damm
2015-07-20 10:06 ` [PATCH 02/03] irqchip: renesas-irqc: Use linear IRQ domain Magnus Damm
2015-07-20 11:21   ` [tip:irq/core] irqchip/renesas-irqc: " tip-bot for Magnus Damm
2015-07-20 10:06 ` Magnus Damm [this message]
2015-07-20 11:22   ` [tip:irq/core] irqchip/renesas-irqc: Make use of irq_find_mapping () tip-bot for Magnus Damm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150720100635.2552.20906.sendpatchset@little-apple \
    --to=magnus.damm@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=horms@verge.net.au \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox