diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-03-24 17:27:35 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-03-24 19:02:51 -0400 |
commit | b15f052cb8c1ba2a55998707f29dc8a8e5cc40ca (patch) | |
tree | 20f5105d58ecb0412300cb41219d106c5af9e315 /arch | |
parent | 47a5d9dcbb595b1bef54f59ba3846170e13be32a (diff) |
arm/gpio: Remove three copies of broken and racy debug code
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>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
LKML-Reference: <20110324212508.931638262@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-ep93xx/gpio.c | 39 | ||||
-rw-r--r-- | arch/arm/plat-nomadik/gpio.c | 45 |
2 files changed, 0 insertions, 84 deletions
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c index a889fa7c3ba1..e327fd107c3f 100644 --- a/arch/arm/mach-ep93xx/gpio.c +++ b/arch/arm/mach-ep93xx/gpio.c | |||
@@ -366,45 +366,6 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) | |||
366 | gpiochip_is_requested(chip, i) ? : "", | 366 | gpiochip_is_requested(chip, i) ? : "", |
367 | is_out ? "out" : "in ", | 367 | is_out ? "out" : "in ", |
368 | (data_reg & (1 << i)) ? "hi" : "lo"); | 368 | (data_reg & (1 << i)) ? "hi" : "lo"); |
369 | |||
370 | if (!is_out) { | ||
371 | int irq = gpio_to_irq(gpio); | ||
372 | struct irq_desc *desc = irq_desc + irq; | ||
373 | |||
374 | if (irq >= 0 && desc->action) { | ||
375 | char *trigger; | ||
376 | |||
377 | switch (desc->status & IRQ_TYPE_SENSE_MASK) { | ||
378 | case IRQ_TYPE_NONE: | ||
379 | trigger = "(default)"; | ||
380 | break; | ||
381 | case IRQ_TYPE_EDGE_FALLING: | ||
382 | trigger = "edge-falling"; | ||
383 | break; | ||
384 | case IRQ_TYPE_EDGE_RISING: | ||
385 | trigger = "edge-rising"; | ||
386 | break; | ||
387 | case IRQ_TYPE_EDGE_BOTH: | ||
388 | trigger = "edge-both"; | ||
389 | break; | ||
390 | case IRQ_TYPE_LEVEL_HIGH: | ||
391 | trigger = "level-high"; | ||
392 | break; | ||
393 | case IRQ_TYPE_LEVEL_LOW: | ||
394 | trigger = "level-low"; | ||
395 | break; | ||
396 | default: | ||
397 | trigger = "?trigger?"; | ||
398 | break; | ||
399 | } | ||
400 | |||
401 | seq_printf(s, " irq-%d %s%s", | ||
402 | irq, trigger, | ||
403 | (desc->status & IRQ_WAKEUP) | ||
404 | ? " wakeup" : ""); | ||
405 | } | ||
406 | } | ||
407 | |||
408 | seq_printf(s, "\n"); | 369 | seq_printf(s, "\n"); |
409 | } | 370 | } |
410 | } | 371 | } |
diff --git a/arch/arm/plat-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c index 70620426ee55..80643bc38e10 100644 --- a/arch/arm/plat-nomadik/gpio.c +++ b/arch/arm/plat-nomadik/gpio.c | |||
@@ -832,51 +832,6 @@ static void nmk_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) | |||
832 | : "? ", | 832 | : "? ", |
833 | (mode < 0) ? "unknown" : modes[mode], | 833 | (mode < 0) ? "unknown" : modes[mode], |
834 | pull ? "pull" : "none"); | 834 | pull ? "pull" : "none"); |
835 | |||
836 | if (!is_out) { | ||
837 | int irq = gpio_to_irq(gpio); | ||
838 | struct irq_desc *desc = irq_to_desc(irq); | ||
839 | |||
840 | /* This races with request_irq(), set_irq_type(), | ||
841 | * and set_irq_wake() ... but those are "rare". | ||
842 | * | ||
843 | * More significantly, trigger type flags aren't | ||
844 | * currently maintained by genirq. | ||
845 | */ | ||
846 | if (irq >= 0 && desc->action) { | ||
847 | char *trigger; | ||
848 | |||
849 | switch (desc->status & IRQ_TYPE_SENSE_MASK) { | ||
850 | case IRQ_TYPE_NONE: | ||
851 | trigger = "(default)"; | ||
852 | break; | ||
853 | case IRQ_TYPE_EDGE_FALLING: | ||
854 | trigger = "edge-falling"; | ||
855 | break; | ||
856 | case IRQ_TYPE_EDGE_RISING: | ||
857 | trigger = "edge-rising"; | ||
858 | break; | ||
859 | case IRQ_TYPE_EDGE_BOTH: | ||
860 | trigger = "edge-both"; | ||
861 | break; | ||
862 | case IRQ_TYPE_LEVEL_HIGH: | ||
863 | trigger = "level-high"; | ||
864 | break; | ||
865 | case IRQ_TYPE_LEVEL_LOW: | ||
866 | trigger = "level-low"; | ||
867 | break; | ||
868 | default: | ||
869 | trigger = "?trigger?"; | ||
870 | break; | ||
871 | } | ||
872 | |||
873 | seq_printf(s, " irq-%d %s%s", | ||
874 | irq, trigger, | ||
875 | (desc->status & IRQ_WAKEUP) | ||
876 | ? " wakeup" : ""); | ||
877 | } | ||
878 | } | ||
879 | |||
880 | seq_printf(s, "\n"); | 835 | seq_printf(s, "\n"); |
881 | } | 836 | } |
882 | } | 837 | } |