public inbox for linux-kernel@vger.kernel.org
 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 10/10] mfd: Fold irq_set_chip/irq_set_handler
Date: Fri, 25 Mar 2011 11:12:35 -0000	[thread overview]
Message-ID: <20110325111218.536585142@linutronix.de> (raw)
In-Reply-To: 20110325110939.701487744@linutronix.de

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

Use the combined irq_set_chip_and_handler() function
instead. Converted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/mfd/asic3.c      |    3 +--
 drivers/mfd/htc-egpio.c  |    7 +++----
 drivers/mfd/htc-i2cpld.c |    4 ++--
 drivers/mfd/t7l66xb.c    |    3 +--
 drivers/mfd/tc6393xb.c   |    3 +--
 5 files changed, 8 insertions(+), 12 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
@@ -416,8 +416,7 @@ static void asic3_irq_remove(struct plat
 
 	for (irq = irq_base; irq < irq_base + ASIC3_NR_IRQS; irq++) {
 		set_irq_flags(irq, 0);
-		irq_set_handler(irq, NULL);
-		irq_set_chip(irq, NULL);
+		irq_set_chip_and_handler(irq, NULL, NULL);
 		irq_set_chip_data(irq, NULL);
 	}
 	irq_set_chained_handler(asic->irq_nr, NULL);
Index: linux-2.6-tip/drivers/mfd/htc-egpio.c
===================================================================
--- linux-2.6-tip.orig/drivers/mfd/htc-egpio.c
+++ linux-2.6-tip/drivers/mfd/htc-egpio.c
@@ -344,9 +344,9 @@ static int __init egpio_probe(struct pla
 			ei->ack_write = 0;
 		irq_end = ei->irq_start + ei->nirqs;
 		for (irq = ei->irq_start; irq < irq_end; irq++) {
-			irq_set_chip(irq, &egpio_muxed_chip);
+			irq_set_chip_and_handler(irq, &egpio_muxed_chip,
+						 handle_simple_irq);
 			irq_set_chip_data(irq, ei);
-			irq_set_handler(irq, handle_simple_irq);
 			set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
 		}
 		irq_set_irq_type(ei->chained_irq, IRQ_TYPE_EDGE_RISING);
@@ -373,8 +373,7 @@ static int __exit egpio_remove(struct pl
 	if (ei->chained_irq) {
 		irq_end = ei->irq_start + ei->nirqs;
 		for (irq = ei->irq_start; irq < irq_end; irq++) {
-			irq_set_chip(irq, NULL);
-			irq_set_handler(irq, NULL);
+			irq_set_chip_and_handler(irq, NULL, NULL);
 			set_irq_flags(irq, 0);
 		}
 		irq_set_chained_handler(ei->chained_irq, NULL);
Index: linux-2.6-tip/drivers/mfd/htc-i2cpld.c
===================================================================
--- linux-2.6-tip.orig/drivers/mfd/htc-i2cpld.c
+++ linux-2.6-tip/drivers/mfd/htc-i2cpld.c
@@ -348,9 +348,9 @@ static int __devinit htcpld_setup_chip_i
 	/* Setup irq handlers */
 	irq_end = chip->irq_start + chip->nirqs;
 	for (irq = chip->irq_start; irq < irq_end; irq++) {
-		irq_set_chip(irq, &htcpld_muxed_chip);
+		irq_set_chip_and_handler(irq, &htcpld_muxed_chip,
+					 handle_simple_irq);
 		irq_set_chip_data(irq, chip);
-		irq_set_handler(irq, handle_simple_irq);
 #ifdef CONFIG_ARM
 		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
 #else
Index: linux-2.6-tip/drivers/mfd/t7l66xb.c
===================================================================
--- linux-2.6-tip.orig/drivers/mfd/t7l66xb.c
+++ linux-2.6-tip/drivers/mfd/t7l66xb.c
@@ -243,9 +243,8 @@ static void t7l66xb_attach_irq(struct pl
 	irq_base = t7l66xb->irq_base;
 
 	for (irq = irq_base; irq < irq_base + T7L66XB_NR_IRQS; irq++) {
-		irq_set_chip(irq, &t7l66xb_chip);
+		irq_set_chip_and_handler(irq, &t7l66xb_chip, handle_level_irq);
 		irq_set_chip_data(irq, t7l66xb);
-		irq_set_handler(irq, handle_level_irq);
 #ifdef CONFIG_ARM
 		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
 #endif
Index: linux-2.6-tip/drivers/mfd/tc6393xb.c
===================================================================
--- linux-2.6-tip.orig/drivers/mfd/tc6393xb.c
+++ linux-2.6-tip/drivers/mfd/tc6393xb.c
@@ -572,9 +572,8 @@ static void tc6393xb_attach_irq(struct p
 	irq_base = tc6393xb->irq_base;
 
 	for (irq = irq_base; irq < irq_base + TC6393XB_NR_IRQS; irq++) {
-		irq_set_chip(irq, &tc6393xb_chip);
+		irq_set_chip_and_handler(irq, &tc6393xb_chip, handle_edge_irq);
 		irq_set_chip_data(irq, tc6393xb);
-		irq_set_handler(irq, handle_edge_irq);
 		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
 	}
 



      parent 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 ` [patch 01/10] mfd: asic3: Cleanup irq handling Thomas Gleixner
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 08/10] mfd: twl6030: Cleanup interrupt handling Thomas Gleixner
2011-03-25 11:12 ` [patch 07/10] mfd: twl4030: " 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 ` Thomas Gleixner [this message]

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=20110325111218.536585142@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