Re: [patch 2.6.20-rc1 5/6] SA1100 GPIO wrappers

From: Russell King
Date: Sat Dec 30 2006 - 10:10:08 EST


On Sat, Dec 30, 2006 at 02:59:39PM +0100, pHilipp Zabel wrote:
> --- linux-2.6.orig/arch/arm/mach-sa1100/generic.c 2006-12-27
> 21:50:03.000000000 +0100
> +++ linux-2.6/arch/arm/mach-sa1100/generic.c 2006-12-30
> 14:50:42.000000000 +0100
> @@ -138,6 +138,36 @@
> return v;
> }
>
> +int sa1100_gpio_direction_input(unsigned gpio)
> +{
> + unsigned long flags;
> +
> + if (gpio > GPIO_MAX)

Obvious space/tab confusion. Please use a consistent indentation style.

> + return -EINVAL;
> +
> + local_irq_save(flags);

Ditto.

> + GPDR &= ~GPIO_GPIO(gpio);
> + local_irq_restore(flags);

Ditto.

> + return 0;
> +}
> +
> +EXPORT_SYMBOL(sa1100_gpio_direction_input);
> +
> +int sa1100_gpio_direction_output(unsigned gpio)
> +{
> + unsigned long flags;

Ditto.

> +
> + if (gpio > GPIO_MAX)
> + return -EINVAL;
> +
> + local_irq_save(flags);

Ditto.

> + GPDR |= GPIO_GPIO(gpio);
> + local_irq_restore(flags);

Ditto.


--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
-
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/