public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 0/3] gpio: Final genirq cleanups
@ 2011-03-24 21:27 Thomas Gleixner
  2011-03-24 21:27 ` [patch 1/3] arm/gpio: Remove three copies of broken and racy debug code Thomas Gleixner
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Thomas Gleixner @ 2011-03-24 21:27 UTC (permalink / raw)
  To: LKML; +Cc: Grant Likely

Grant,

if possible, please push this lot to Linus for .39. It's cleaning up
the missing bits and pieces which are necessary to remove all the
compat cruft in the genirq code.

Thanks,

	tglx


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [patch 1/3] arm/gpio: Remove three copies of broken and racy debug code
  2011-03-24 21:27 [patch 0/3] gpio: Final genirq cleanups Thomas Gleixner
@ 2011-03-24 21:27 ` Thomas Gleixner
  2011-03-24 21:41   ` Ryan Mallon
  2011-03-24 21:27 ` [patch 2/3] gpio: Cleanup genirq namespace Thomas Gleixner
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Thomas Gleixner @ 2011-03-24 21:27 UTC (permalink / raw)
  To: LKML; +Cc: Grant Likely

[-- Attachment #1: remove-gpio-crap.patch --]
[-- Type: text/plain, Size: 4686 bytes --]

gpiolib plus two gpio implementations in arm fiddle in the guts of
irq_desc in a racy and buggy way. Remove the stuff. I already told the
gpio folks that we can provide that information in a proper way if
necessary.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/arm/mach-ep93xx/gpio.c  |   39 -------------------------------------
 arch/arm/plat-nomadik/gpio.c |   45 -------------------------------------------
 drivers/gpio/gpiolib.c       |   45 -------------------------------------------
 3 files changed, 129 deletions(-)

Index: linux-2.6-tip/arch/arm/mach-ep93xx/gpio.c
===================================================================
--- linux-2.6-tip.orig/arch/arm/mach-ep93xx/gpio.c
+++ linux-2.6-tip/arch/arm/mach-ep93xx/gpio.c
@@ -366,45 +366,6 @@ static void ep93xx_gpio_dbg_show(struct 
 				gpiochip_is_requested(chip, i) ? : "",
 				is_out ? "out" : "in ",
 				(data_reg & (1 << i)) ? "hi" : "lo");
-
-		if (!is_out) {
-			int irq = gpio_to_irq(gpio);
-			struct irq_desc *desc = irq_desc + irq;
-
-			if (irq >= 0 && desc->action) {
-				char *trigger;
-
-				switch (desc->status & IRQ_TYPE_SENSE_MASK) {
-				case IRQ_TYPE_NONE:
-					trigger = "(default)";
-					break;
-				case IRQ_TYPE_EDGE_FALLING:
-					trigger = "edge-falling";
-					break;
-				case IRQ_TYPE_EDGE_RISING:
-					trigger = "edge-rising";
-					break;
-				case IRQ_TYPE_EDGE_BOTH:
-					trigger = "edge-both";
-					break;
-				case IRQ_TYPE_LEVEL_HIGH:
-					trigger = "level-high";
-					break;
-				case IRQ_TYPE_LEVEL_LOW:
-					trigger = "level-low";
-					break;
-				default:
-					trigger = "?trigger?";
-					break;
-				}
-
-				seq_printf(s, " irq-%d %s%s",
-						irq, trigger,
-						(desc->status & IRQ_WAKEUP)
-							? " wakeup" : "");
-			}
-		}
-
 		seq_printf(s, "\n");
 	}
 }
Index: linux-2.6-tip/arch/arm/plat-nomadik/gpio.c
===================================================================
--- linux-2.6-tip.orig/arch/arm/plat-nomadik/gpio.c
+++ linux-2.6-tip/arch/arm/plat-nomadik/gpio.c
@@ -832,51 +832,6 @@ static void nmk_gpio_dbg_show(struct seq
 				: "?  ",
 			(mode < 0) ? "unknown" : modes[mode],
 			pull ? "pull" : "none");
-
-		if (!is_out) {
-			int		irq = gpio_to_irq(gpio);
-			struct irq_desc	*desc = irq_to_desc(irq);
-
-			/* This races with request_irq(), set_irq_type(),
-			 * and set_irq_wake() ... but those are "rare".
-			 *
-			 * More significantly, trigger type flags aren't
-			 * currently maintained by genirq.
-			 */
-			if (irq >= 0 && desc->action) {
-				char *trigger;
-
-				switch (desc->status & IRQ_TYPE_SENSE_MASK) {
-				case IRQ_TYPE_NONE:
-					trigger = "(default)";
-					break;
-				case IRQ_TYPE_EDGE_FALLING:
-					trigger = "edge-falling";
-					break;
-				case IRQ_TYPE_EDGE_RISING:
-					trigger = "edge-rising";
-					break;
-				case IRQ_TYPE_EDGE_BOTH:
-					trigger = "edge-both";
-					break;
-				case IRQ_TYPE_LEVEL_HIGH:
-					trigger = "level-high";
-					break;
-				case IRQ_TYPE_LEVEL_LOW:
-					trigger = "level-low";
-					break;
-				default:
-					trigger = "?trigger?";
-					break;
-				}
-
-				seq_printf(s, " irq-%d %s%s",
-					irq, trigger,
-					(desc->status & IRQ_WAKEUP)
-						? " wakeup" : "");
-			}
-		}
-
 		seq_printf(s, "\n");
 	}
 }
Index: linux-2.6-tip/drivers/gpio/gpiolib.c
===================================================================
--- linux-2.6-tip.orig/drivers/gpio/gpiolib.c
+++ linux-2.6-tip/drivers/gpio/gpiolib.c
@@ -1656,51 +1656,6 @@ static void gpiolib_dbg_show(struct seq_
 			chip->get
 				? (chip->get(chip, i) ? "hi" : "lo")
 				: "?  ");
-
-		if (!is_out) {
-			int		irq = gpio_to_irq(gpio);
-			struct irq_desc	*desc = irq_to_desc(irq);
-
-			/* This races with request_irq(), set_irq_type(),
-			 * and set_irq_wake() ... but those are "rare".
-			 *
-			 * More significantly, trigger type flags aren't
-			 * currently maintained by genirq.
-			 */
-			if (irq >= 0 && desc->action) {
-				char *trigger;
-
-				switch (desc->status & IRQ_TYPE_SENSE_MASK) {
-				case IRQ_TYPE_NONE:
-					trigger = "(default)";
-					break;
-				case IRQ_TYPE_EDGE_FALLING:
-					trigger = "edge-falling";
-					break;
-				case IRQ_TYPE_EDGE_RISING:
-					trigger = "edge-rising";
-					break;
-				case IRQ_TYPE_EDGE_BOTH:
-					trigger = "edge-both";
-					break;
-				case IRQ_TYPE_LEVEL_HIGH:
-					trigger = "level-high";
-					break;
-				case IRQ_TYPE_LEVEL_LOW:
-					trigger = "level-low";
-					break;
-				default:
-					trigger = "?trigger?";
-					break;
-				}
-
-				seq_printf(s, " irq-%d %s%s",
-					irq, trigger,
-					(desc->status & IRQ_WAKEUP)
-						? " wakeup" : "");
-			}
-		}
-
 		seq_printf(s, "\n");
 	}
 }



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [patch 2/3] gpio: Cleanup genirq namespace
  2011-03-24 21:27 [patch 0/3] gpio: Final genirq cleanups Thomas Gleixner
  2011-03-24 21:27 ` [patch 1/3] arm/gpio: Remove three copies of broken and racy debug code Thomas Gleixner
@ 2011-03-24 21:27 ` Thomas Gleixner
  2011-03-24 21:27 ` [patch 3/3] gpio: Fold irq_set_chip/irq_set_handler to irq_set_chip_and_handler Thomas Gleixner
  2011-03-24 21:40 ` [patch 0/3] gpio: Final genirq cleanups Grant Likely
  3 siblings, 0 replies; 8+ messages in thread
From: Thomas Gleixner @ 2011-03-24 21:27 UTC (permalink / raw)
  To: LKML; +Cc: Grant Likely

[-- Attachment #1: gpio-irq-namespace.patch --]
[-- Type: text/plain, Size: 10672 bytes --]

Converted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/gpio/adp5588-gpio.c |    8 ++++----
 drivers/gpio/max732x.c      |    8 ++++----
 drivers/gpio/pca953x.c      |    6 +++---
 drivers/gpio/pl061.c        |   14 +++++++-------
 drivers/gpio/stmpe-gpio.c   |   12 ++++++------
 drivers/gpio/sx150x.c       |   10 +++++-----
 drivers/gpio/tc3589x-gpio.c |   12 ++++++------
 drivers/gpio/timbgpio.c     |   18 +++++++++---------
 drivers/gpio/vr41xx_giu.c   |   12 ++++++------
 9 files changed, 50 insertions(+), 50 deletions(-)

Index: linux-2.6-tip/drivers/gpio/adp5588-gpio.c
===================================================================
--- linux-2.6-tip.orig/drivers/gpio/adp5588-gpio.c
+++ linux-2.6-tip/drivers/gpio/adp5588-gpio.c
@@ -289,10 +289,10 @@ static int adp5588_irq_setup(struct adp5
 
 	for (gpio = 0; gpio < dev->gpio_chip.ngpio; gpio++) {
 		int irq = gpio + dev->irq_base;
-		set_irq_chip_data(irq, dev);
-		set_irq_chip_and_handler(irq, &adp5588_irq_chip,
+		irq_set_chip_data(irq, dev);
+		irq_set_chip_and_handler(irq, &adp5588_irq_chip,
 					 handle_level_irq);
-		set_irq_nested_thread(irq, 1);
+		irq_set_nested_thread(irq, 1);
 #ifdef CONFIG_ARM
 		/*
 		 * ARM needs us to explicitly flag the IRQ as VALID,
@@ -300,7 +300,7 @@ static int adp5588_irq_setup(struct adp5
 		 */
 		set_irq_flags(irq, IRQF_VALID);
 #else
-		set_irq_noprobe(irq);
+		irq_set_noprobe(irq);
 #endif
 	}
 
Index: linux-2.6-tip/drivers/gpio/max732x.c
===================================================================
--- linux-2.6-tip.orig/drivers/gpio/max732x.c
+++ linux-2.6-tip/drivers/gpio/max732x.c
@@ -470,14 +470,14 @@ static int max732x_irq_setup(struct max7
 			if (!(chip->dir_input & (1 << lvl)))
 				continue;
 
-			set_irq_chip_data(irq, chip);
-			set_irq_chip_and_handler(irq, &max732x_irq_chip,
+			irq_set_chip_data(irq, chip);
+			irq_set_chip_and_handler(irq, &max732x_irq_chip,
 						 handle_edge_irq);
-			set_irq_nested_thread(irq, 1);
+			irq_set_nested_thread(irq, 1);
 #ifdef CONFIG_ARM
 			set_irq_flags(irq, IRQF_VALID);
 #else
-			set_irq_noprobe(irq);
+			irq_set_noprobe(irq);
 #endif
 		}
 
Index: linux-2.6-tip/drivers/gpio/pca953x.c
===================================================================
--- linux-2.6-tip.orig/drivers/gpio/pca953x.c
+++ linux-2.6-tip/drivers/gpio/pca953x.c
@@ -395,13 +395,13 @@ static int pca953x_irq_setup(struct pca9
 		for (lvl = 0; lvl < chip->gpio_chip.ngpio; lvl++) {
 			int irq = lvl + chip->irq_base;
 
-			set_irq_chip_data(irq, chip);
-			set_irq_chip_and_handler(irq, &pca953x_irq_chip,
+			irq_set_chip_data(irq, chip);
+			irq_set_chip_and_handler(irq, &pca953x_irq_chip,
 						 handle_edge_irq);
 #ifdef CONFIG_ARM
 			set_irq_flags(irq, IRQF_VALID);
 #else
-			set_irq_noprobe(irq);
+			irq_set_noprobe(irq);
 #endif
 		}
 
Index: linux-2.6-tip/drivers/gpio/pl061.c
===================================================================
--- linux-2.6-tip.orig/drivers/gpio/pl061.c
+++ linux-2.6-tip/drivers/gpio/pl061.c
@@ -210,7 +210,7 @@ static struct irq_chip pl061_irqchip = {
 
 static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
 {
-	struct list_head *chip_list = get_irq_data(irq);
+	struct list_head *chip_list = irq_get_handler_data(irq);
 	struct list_head *ptr;
 	struct pl061_gpio *chip;
 
@@ -294,7 +294,7 @@ static int pl061_probe(struct amba_devic
 		ret = -ENODEV;
 		goto iounmap;
 	}
-	set_irq_chained_handler(irq, pl061_irq_handler);
+	irq_set_chained_handler(irq, pl061_irq_handler);
 	if (!test_and_set_bit(irq, init_irq)) { /* list initialized? */
 		chip_list = kmalloc(sizeof(*chip_list), GFP_KERNEL);
 		if (chip_list == NULL) {
@@ -303,9 +303,9 @@ static int pl061_probe(struct amba_devic
 			goto iounmap;
 		}
 		INIT_LIST_HEAD(chip_list);
-		set_irq_data(irq, chip_list);
+		irq_set_handler_data(irq, chip_list);
 	} else
-		chip_list = get_irq_data(irq);
+		chip_list = irq_get_handler_data(irq);
 	list_add(&chip->list, chip_list);
 
 	for (i = 0; i < PL061_GPIO_NR; i++) {
@@ -315,10 +315,10 @@ static int pl061_probe(struct amba_devic
 		else
 			pl061_direction_input(&chip->gc, i);
 
-		set_irq_chip(i+chip->irq_base, &pl061_irqchip);
-		set_irq_handler(i+chip->irq_base, handle_simple_irq);
+		irq_set_chip(i + chip->irq_base, &pl061_irqchip);
+		irq_set_handler(i + chip->irq_base, handle_simple_irq);
 		set_irq_flags(i+chip->irq_base, IRQF_VALID);
-		set_irq_chip_data(i+chip->irq_base, chip);
+		irq_set_chip_data(i + chip->irq_base, chip);
 	}
 
 	return 0;
Index: linux-2.6-tip/drivers/gpio/stmpe-gpio.c
===================================================================
--- linux-2.6-tip.orig/drivers/gpio/stmpe-gpio.c
+++ linux-2.6-tip/drivers/gpio/stmpe-gpio.c
@@ -254,14 +254,14 @@ static int __devinit stmpe_gpio_irq_init
 	int irq;
 
 	for (irq = base; irq < base + stmpe_gpio->chip.ngpio; irq++) {
-		set_irq_chip_data(irq, stmpe_gpio);
-		set_irq_chip_and_handler(irq, &stmpe_gpio_irq_chip,
+		irq_set_chip_data(irq, stmpe_gpio);
+		irq_set_chip_and_handler(irq, &stmpe_gpio_irq_chip,
 					 handle_simple_irq);
-		set_irq_nested_thread(irq, 1);
+		irq_set_nested_thread(irq, 1);
 #ifdef CONFIG_ARM
 		set_irq_flags(irq, IRQF_VALID);
 #else
-		set_irq_noprobe(irq);
+		irq_set_noprobe(irq);
 #endif
 	}
 
@@ -277,8 +277,8 @@ static void stmpe_gpio_irq_remove(struct
 #ifdef CONFIG_ARM
 		set_irq_flags(irq, 0);
 #endif
-		set_irq_chip_and_handler(irq, NULL, NULL);
-		set_irq_chip_data(irq, NULL);
+		irq_set_chip_and_handler(irq, NULL, NULL);
+		irq_set_chip_data(irq, NULL);
 	}
 }
 
Index: linux-2.6-tip/drivers/gpio/sx150x.c
===================================================================
--- linux-2.6-tip.orig/drivers/gpio/sx150x.c
+++ linux-2.6-tip/drivers/gpio/sx150x.c
@@ -551,12 +551,12 @@ static int sx150x_install_irq_chip(struc
 
 	for (n = 0; n < chip->dev_cfg->ngpios; ++n) {
 		irq = irq_base + n;
-		set_irq_chip_and_handler(irq, &chip->irq_chip, handle_edge_irq);
-		set_irq_nested_thread(irq, 1);
+		irq_set_chip_and_handler(irq, &chip->irq_chip, handle_edge_irq);
+		irq_set_nested_thread(irq, 1);
 #ifdef CONFIG_ARM
 		set_irq_flags(irq, IRQF_VALID);
 #else
-		set_irq_noprobe(irq);
+		irq_set_noprobe(irq);
 #endif
 	}
 
@@ -583,8 +583,8 @@ static void sx150x_remove_irq_chip(struc
 
 	for (n = 0; n < chip->dev_cfg->ngpios; ++n) {
 		irq = chip->irq_base + n;
-		set_irq_handler(irq, NULL);
-		set_irq_chip(irq, NULL);
+		irq_set_handler(irq, NULL);
+		irq_set_chip(irq, NULL);
 	}
 }
 
Index: linux-2.6-tip/drivers/gpio/tc3589x-gpio.c
===================================================================
--- linux-2.6-tip.orig/drivers/gpio/tc3589x-gpio.c
+++ linux-2.6-tip/drivers/gpio/tc3589x-gpio.c
@@ -239,14 +239,14 @@ static int tc3589x_gpio_irq_init(struct 
 	int irq;
 
 	for (irq = base; irq < base + tc3589x_gpio->chip.ngpio; irq++) {
-		set_irq_chip_data(irq, tc3589x_gpio);
-		set_irq_chip_and_handler(irq, &tc3589x_gpio_irq_chip,
+		irq_set_chip_data(irq, tc3589x_gpio);
+		irq_set_chip_and_handler(irq, &tc3589x_gpio_irq_chip,
 					 handle_simple_irq);
-		set_irq_nested_thread(irq, 1);
+		irq_set_nested_thread(irq, 1);
 #ifdef CONFIG_ARM
 		set_irq_flags(irq, IRQF_VALID);
 #else
-		set_irq_noprobe(irq);
+		irq_set_noprobe(irq);
 #endif
 	}
 
@@ -262,8 +262,8 @@ static void tc3589x_gpio_irq_remove(stru
 #ifdef CONFIG_ARM
 		set_irq_flags(irq, 0);
 #endif
-		set_irq_chip_and_handler(irq, NULL, NULL);
-		set_irq_chip_data(irq, NULL);
+		irq_set_chip_and_handler(irq, NULL, NULL);
+		irq_set_chip_data(irq, NULL);
 	}
 }
 
Index: linux-2.6-tip/drivers/gpio/timbgpio.c
===================================================================
--- linux-2.6-tip.orig/drivers/gpio/timbgpio.c
+++ linux-2.6-tip/drivers/gpio/timbgpio.c
@@ -195,7 +195,7 @@ out:
 
 static void timbgpio_irq(unsigned int irq, struct irq_desc *desc)
 {
-	struct timbgpio *tgpio = get_irq_data(irq);
+	struct timbgpio *tgpio = irq_get_handler_data(irq);
 	unsigned long ipr;
 	int offset;
 
@@ -291,16 +291,16 @@ static int __devinit timbgpio_probe(stru
 		return 0;
 
 	for (i = 0; i < pdata->nr_pins; i++) {
-		set_irq_chip_and_handler_name(tgpio->irq_base + i,
+		irq_set_chip_and_handler_name(tgpio->irq_base + i,
 			&timbgpio_irqchip, handle_simple_irq, "mux");
-		set_irq_chip_data(tgpio->irq_base + i, tgpio);
+		irq_set_chip_data(tgpio->irq_base + i, tgpio);
 #ifdef CONFIG_ARM
 		set_irq_flags(tgpio->irq_base + i, IRQF_VALID | IRQF_PROBE);
 #endif
 	}
 
-	set_irq_data(irq, tgpio);
-	set_irq_chained_handler(irq, timbgpio_irq);
+	irq_set_handler_data(irq, tgpio);
+	irq_set_chained_handler(irq, timbgpio_irq);
 
 	return 0;
 
@@ -327,12 +327,12 @@ static int __devexit timbgpio_remove(str
 	if (irq >= 0 && tgpio->irq_base > 0) {
 		int i;
 		for (i = 0; i < pdata->nr_pins; i++) {
-			set_irq_chip(tgpio->irq_base + i, NULL);
-			set_irq_chip_data(tgpio->irq_base + i, NULL);
+			irq_set_chip(tgpio->irq_base + i, NULL);
+			irq_set_chip_data(tgpio->irq_base + i, NULL);
 		}
 
-		set_irq_handler(irq, NULL);
-		set_irq_data(irq, NULL);
+		irq_set_handler(irq, NULL);
+		irq_set_handler_data(irq, NULL);
 	}
 
 	err = gpiochip_remove(&tgpio->gpio);
Index: linux-2.6-tip/drivers/gpio/vr41xx_giu.c
===================================================================
--- linux-2.6-tip.orig/drivers/gpio/vr41xx_giu.c
+++ linux-2.6-tip/drivers/gpio/vr41xx_giu.c
@@ -238,13 +238,13 @@ void vr41xx_set_irq_trigger(unsigned int
 					break;
 				}
 			}
-			set_irq_chip_and_handler(GIU_IRQ(pin),
+			irq_set_chip_and_handler(GIU_IRQ(pin),
 						 &giuint_low_irq_chip,
 						 handle_edge_irq);
 		} else {
 			giu_clear(GIUINTTYPL, mask);
 			giu_clear(GIUINTHTSELL, mask);
-			set_irq_chip_and_handler(GIU_IRQ(pin),
+			irq_set_chip_and_handler(GIU_IRQ(pin),
 						 &giuint_low_irq_chip,
 						 handle_level_irq);
 		}
@@ -273,13 +273,13 @@ void vr41xx_set_irq_trigger(unsigned int
 					break;
 				}
 			}
-			set_irq_chip_and_handler(GIU_IRQ(pin),
+			irq_set_chip_and_handler(GIU_IRQ(pin),
 						 &giuint_high_irq_chip,
 						 handle_edge_irq);
 		} else {
 			giu_clear(GIUINTTYPH, mask);
 			giu_clear(GIUINTHTSELH, mask);
-			set_irq_chip_and_handler(GIU_IRQ(pin),
+			irq_set_chip_and_handler(GIU_IRQ(pin),
 						 &giuint_high_irq_chip,
 						 handle_level_irq);
 		}
@@ -539,9 +539,9 @@ static int __devinit giu_probe(struct pl
 			chip = &giuint_high_irq_chip;
 
 		if (trigger & (1 << pin))
-			set_irq_chip_and_handler(i, chip, handle_edge_irq);
+			irq_set_chip_and_handler(i, chip, handle_edge_irq);
 		else
-			set_irq_chip_and_handler(i, chip, handle_level_irq);
+			irq_set_chip_and_handler(i, chip, handle_level_irq);
 
 	}
 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [patch 3/3] gpio: Fold irq_set_chip/irq_set_handler to irq_set_chip_and_handler
  2011-03-24 21:27 [patch 0/3] gpio: Final genirq cleanups Thomas Gleixner
  2011-03-24 21:27 ` [patch 1/3] arm/gpio: Remove three copies of broken and racy debug code Thomas Gleixner
  2011-03-24 21:27 ` [patch 2/3] gpio: Cleanup genirq namespace Thomas Gleixner
@ 2011-03-24 21:27 ` Thomas Gleixner
  2011-03-24 21:40 ` [patch 0/3] gpio: Final genirq cleanups Grant Likely
  3 siblings, 0 replies; 8+ messages in thread
From: Thomas Gleixner @ 2011-03-24 21:27 UTC (permalink / raw)
  To: LKML; +Cc: Grant Likely

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

Converted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/gpio/pl061.c  |    4 ++--
 drivers/gpio/sx150x.c |    3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

Index: linux-2.6-tip/drivers/gpio/pl061.c
===================================================================
--- linux-2.6-tip.orig/drivers/gpio/pl061.c
+++ linux-2.6-tip/drivers/gpio/pl061.c
@@ -315,8 +315,8 @@ static int pl061_probe(struct amba_devic
 		else
 			pl061_direction_input(&chip->gc, i);
 
-		irq_set_chip(i + chip->irq_base, &pl061_irqchip);
-		irq_set_handler(i + chip->irq_base, handle_simple_irq);
+		irq_set_chip_and_handler(i + chip->irq_base, &pl061_irqchip,
+					 handle_simple_irq);
 		set_irq_flags(i+chip->irq_base, IRQF_VALID);
 		irq_set_chip_data(i + chip->irq_base, chip);
 	}
Index: linux-2.6-tip/drivers/gpio/sx150x.c
===================================================================
--- linux-2.6-tip.orig/drivers/gpio/sx150x.c
+++ linux-2.6-tip/drivers/gpio/sx150x.c
@@ -583,8 +583,7 @@ static void sx150x_remove_irq_chip(struc
 
 	for (n = 0; n < chip->dev_cfg->ngpios; ++n) {
 		irq = chip->irq_base + n;
-		irq_set_handler(irq, NULL);
-		irq_set_chip(irq, NULL);
+		irq_set_chip_and_handler(irq, NULL, NULL);
 	}
 }
 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 0/3] gpio: Final genirq cleanups
  2011-03-24 21:27 [patch 0/3] gpio: Final genirq cleanups Thomas Gleixner
                   ` (2 preceding siblings ...)
  2011-03-24 21:27 ` [patch 3/3] gpio: Fold irq_set_chip/irq_set_handler to irq_set_chip_and_handler Thomas Gleixner
@ 2011-03-24 21:40 ` Grant Likely
  2011-03-24 21:49   ` Thomas Gleixner
  3 siblings, 1 reply; 8+ messages in thread
From: Grant Likely @ 2011-03-24 21:40 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML

On Thu, Mar 24, 2011 at 3:27 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> Grant,
>
> if possible, please push this lot to Linus for .39. It's cleaning up
> the missing bits and pieces which are necessary to remove all the
> compat cruft in the genirq code.

These look fine.  Since it sounds like you need to base other patches
on top of these, go ahead and add my Acked-by to all of them and push
them through your tree.  I don't have any more gpio patches that I'm
sending to Linus this cycle anyway.

g.

Acked-by: Grant Likely <grant.likely@secretlab.ca>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 1/3] arm/gpio: Remove three copies of broken and racy debug code
  2011-03-24 21:27 ` [patch 1/3] arm/gpio: Remove three copies of broken and racy debug code Thomas Gleixner
@ 2011-03-24 21:41   ` Ryan Mallon
  2011-03-24 22:43     ` Thomas Gleixner
  0 siblings, 1 reply; 8+ messages in thread
From: Ryan Mallon @ 2011-03-24 21:41 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Grant Likely

On 03/25/2011 10:27 AM, Thomas Gleixner wrote:
> gpiolib plus two gpio implementations in arm fiddle in the guts of
> irq_desc in a racy and buggy way. Remove the stuff. I already told the
> gpio folks that we can provide that information in a proper way if
> necessary.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
>  arch/arm/mach-ep93xx/gpio.c  |   39 -------------------------------------
>  arch/arm/plat-nomadik/gpio.c |   45 -------------------------------------------
>  drivers/gpio/gpiolib.c       |   45 -------------------------------------------
>  3 files changed, 129 deletions(-)
>
> Index: linux-2.6-tip/arch/arm/mach-ep93xx/gpio.c
> ===================================================================

I suggested an alternative patch for the ep93xx last time round which
keeps the information that the pin is configured as an interrupt and
tidies the code a bit (moves the newline to the first seq_printf). My
patch is available here:
http://lists-archives.org/linux-kernel/27439434-arm-ep93xx-kill-another-instance-of-broken-irq_desc-fiddling.html

Could we merge that instead please.

Thanks,
~Ryan

-- 
Bluewater Systems Ltd - ARM Technology Solution Centre

Ryan Mallon         		5 Amuri Park, 404 Barbadoes St
ryan@bluewatersys.com         	PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com	New Zealand
Phone: +64 3 3779127		Freecall: Australia 1800 148 751 
Fax:   +64 3 3779135			  USA 1800 261 2934


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 0/3] gpio: Final genirq cleanups
  2011-03-24 21:40 ` [patch 0/3] gpio: Final genirq cleanups Grant Likely
@ 2011-03-24 21:49   ` Thomas Gleixner
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Gleixner @ 2011-03-24 21:49 UTC (permalink / raw)
  To: Grant Likely; +Cc: LKML

On Thu, 24 Mar 2011, Grant Likely wrote:

> On Thu, Mar 24, 2011 at 3:27 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > Grant,
> >
> > if possible, please push this lot to Linus for .39. It's cleaning up
> > the missing bits and pieces which are necessary to remove all the
> > compat cruft in the genirq code.
> 
> These look fine.  Since it sounds like you need to base other patches
> on top of these, go ahead and add my Acked-by to all of them and push
> them through your tree.  I don't have any more gpio patches that I'm
> sending to Linus this cycle anyway.

Will do.
 
> g.
> 
> Acked-by: Grant Likely <grant.likely@secretlab.ca>

Thanks !

       tglx

 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 1/3] arm/gpio: Remove three copies of broken and racy debug code
  2011-03-24 21:41   ` Ryan Mallon
@ 2011-03-24 22:43     ` Thomas Gleixner
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Gleixner @ 2011-03-24 22:43 UTC (permalink / raw)
  To: Ryan Mallon; +Cc: LKML, Grant Likely


On Fri, 25 Mar 2011, Ryan Mallon wrote:

> On 03/25/2011 10:27 AM, Thomas Gleixner wrote:
> > gpiolib plus two gpio implementations in arm fiddle in the guts of
> > irq_desc in a racy and buggy way. Remove the stuff. I already told the
> > gpio folks that we can provide that information in a proper way if
> > necessary.
> >
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > ---
> >  arch/arm/mach-ep93xx/gpio.c  |   39 -------------------------------------
> >  arch/arm/plat-nomadik/gpio.c |   45 -------------------------------------------
> >  drivers/gpio/gpiolib.c       |   45 -------------------------------------------
> >  3 files changed, 129 deletions(-)
> >
> > Index: linux-2.6-tip/arch/arm/mach-ep93xx/gpio.c
> > ===================================================================
> 
> I suggested an alternative patch for the ep93xx last time round which
> keeps the information that the pin is configured as an interrupt and
> tidies the code a bit (moves the newline to the first seq_printf). My
> patch is available here:
> http://lists-archives.org/linux-kernel/27439434-arm-ep93xx-kill-another-instance-of-broken-irq_desc-fiddling.html
> 
> Could we merge that instead please.

Sure. Will pick it up.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-03-24 22:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-24 21:27 [patch 0/3] gpio: Final genirq cleanups Thomas Gleixner
2011-03-24 21:27 ` [patch 1/3] arm/gpio: Remove three copies of broken and racy debug code Thomas Gleixner
2011-03-24 21:41   ` Ryan Mallon
2011-03-24 22:43     ` Thomas Gleixner
2011-03-24 21:27 ` [patch 2/3] gpio: Cleanup genirq namespace Thomas Gleixner
2011-03-24 21:27 ` [patch 3/3] gpio: Fold irq_set_chip/irq_set_handler to irq_set_chip_and_handler Thomas Gleixner
2011-03-24 21:40 ` [patch 0/3] gpio: Final genirq cleanups Grant Likely
2011-03-24 21:49   ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox