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

Russell King
2006-12-30T15:09:34Z

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/