Re: [patch 34/75] arm: ep93xx: Kill another instance of broken irq_descfiddling
From: Ryan Mallon
Date: Thu Feb 10 2011 - 19:22:25 EST
On 02/11/2011 12:37 PM, Thomas Gleixner wrote:
> 1. This is a copy of the borked code in gpiolib
> 2. If you need information about irq state which is not exposed, then talk
> to the maintainer of that code instead of adding totaly horrible open
> coded access.
This code got added simply because it is sometimes helpful to be able to
see how various gpio/irq pins are configured. I'm happy to drop the
functionality (see below), but is there a better way to get this
information? Is it already available somewhere else (proc, sys)?
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
> Cc: Russell King <linux@xxxxxxxxxxxxxxxx>
> ---
> arch/arm/mach-ep93xx/gpio.c | 38 --------------------------------------
> 1 file changed, 38 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
> @@ -354,44 +354,6 @@ static void ep93xx_gpio_dbg_show(struct
> 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) {
Would be nice to at least keep the fact that the gpio is configured as
an interrupt. Something like:
if (!is_out) {
int irq;
irq = gpio_to_irq(gpio);
if (irq >= 0)
seq_printf(s, " (irq %d)", irq);
}
I'm okay with this patch as-is though. We can add a corrected patch
later if we decided that it is still useful to have this information.
~Ryan
--
Bluewater Systems Ltd - ARM Technology Solution Centre
Ryan Mallon 5 Amuri Park, 404 Barbadoes St
ryan@xxxxxxxxxxxxxxxx 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
--
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/