mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Samuel Ortiz <sameo@linux.intel.com>
Subject: [patch 01/10] mfd: asic3: Cleanup irq handling
Date: Fri, 25 Mar 2011 11:12:26 -0000	[thread overview]
Message-ID: <20110325111217.675983999@linutronix.de> (raw)
In-Reply-To: <20110325110939.701487744@linutronix.de>

[-- Attachment #1: mfd-asic3.patch --]
[-- Type: text/plain, Size: 1734 bytes --]

Remove the open coded access to irq_desc and use the proper wrappers.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/mfd/asic3.c |   17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

Index: linux-2.6-tip/drivers/mfd/asic3.c
===================================================================
--- linux-2.6-tip.orig/drivers/mfd/asic3.c
+++ linux-2.6-tip/drivers/mfd/asic3.c
@@ -139,13 +139,12 @@ static void asic3_irq_flip_edge(struct a
 
 static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc)
 {
+	struct asic3 *asic = irq_desc_get_handler_data(desc);
+	struct irq_data *data = irq_desc_get_irq_data(desc);
 	int iter, i;
 	unsigned long flags;
-	struct asic3 *asic;
-
-	desc->irq_data.chip->irq_ack(&desc->irq_data);
 
-	asic = get_irq_data(irq);
+	data->chip->irq_ack(irq_data);
 
 	for (iter = 0 ; iter < MAX_ASIC_ISR_LOOPS; iter++) {
 		u32 status;
@@ -188,8 +187,7 @@ static void asic3_irq_demux(unsigned int
 					irqnr = asic->irq_base +
 						(ASIC3_GPIOS_PER_BANK * bank)
 						+ i;
-					desc = irq_to_desc(irqnr);
-					desc->handle_irq(irqnr, desc);
+					generic_handle_irq(irqnr);
 					if (asic->irq_bothedge[bank] & bit)
 						asic3_irq_flip_edge(asic, base,
 								    bit);
@@ -200,11 +198,8 @@ static void asic3_irq_demux(unsigned int
 		/* Handle remaining IRQs in the status register */
 		for (i = ASIC3_NUM_GPIOS; i < ASIC3_NR_IRQS; i++) {
 			/* They start at bit 4 and go up */
-			if (status & (1 << (i - ASIC3_NUM_GPIOS + 4))) {
-				desc = irq_to_desc(asic->irq_base + i);
-				desc->handle_irq(asic->irq_base + i,
-						 desc);
-			}
+			if (status & (1 << (i - ASIC3_NUM_GPIOS + 4)))
+				generic_handle_irq(asic->irq_base + i);
 		}
 	}
 



  reply	other threads:[~2011-03-25 11:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25 11:12 [patch 00/10] mfd: irq cleanup and namespace conversion Thomas Gleixner
2011-03-25 11:12 ` Thomas Gleixner [this message]
2011-03-25 11:12 ` [patch 02/10] mfd: 88pm860x: Remove unused irq_desc leftovers Thomas Gleixner
2011-03-25 11:12 ` [patch 03/10] mfd: ezx-pcap: Remvove open coded irq handling Thomas Gleixner
2011-03-25 11:12 ` [patch 04/10] mfd: htc-egpio: Cleanup interrupt handling Thomas Gleixner
2011-03-25 11:12 ` [patch 05/10] mfd: htc-i2cpld: " Thomas Gleixner
2011-03-25 11:12 ` [patch 06/10] mfd: mx8925: Remove irq_desc leftovers Thomas Gleixner
2011-03-25 11:12 ` [patch 07/10] mfd: twl4030: Cleanup interrupt handling Thomas Gleixner
2011-03-25 11:12 ` [patch 08/10] mfd: twl6030: " Thomas Gleixner
2011-03-25 11:12 ` [patch 09/10] mfd: Cleanup irq namespace Thomas Gleixner
2011-03-25 12:08   ` Mark Brown
2011-03-25 12:33     ` Thomas Gleixner
2011-03-25 12:41       ` Mark Brown
2011-03-25 11:12 ` [patch 10/10] mfd: Fold irq_set_chip/irq_set_handler Thomas Gleixner

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=20110325111217.675983999@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    /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

all inboxes | Powered by JetHome®