[patch 33/75] gpio: Remove broken irq_desc hackery.

From: Thomas Gleixner
Date: Thu Feb 10 2011 - 18:37:31 EST


No code outside of core is supposed to fiddle with this. If there is
something missing in core, then talk to me and we'll fix it. But
fiddling in core guts just because it can be done is a nono. Using it
unlocked and writing a comment about it is ....

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
drivers/gpio/gpiolib.c | 44 --------------------------------------------
1 file changed, 44 deletions(-)

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
@@ -1657,50 +1657,6 @@ static void gpiolib_dbg_show(struct seq_
? (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");
}
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/