[PATCH 1/8] pxa: support pxa168 LCD controller SPI operation

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Nov 12 17:17:53 EST 2009


On Thu, Nov 12, 2009 at 10:16:16AM +0800, Jun Nie wrote:
> diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c
> index 84d8327..e1f1c5f 100644
> --- a/drivers/video/pxa168fb.c
> +++ b/drivers/video/pxa168fb.c
> @@ -27,12 +27,90 @@
>  #include <linux/clk.h>
>  #include <linux/err.h>
>  #include <linux/uaccess.h>
> +#include <linux/gpio.h>
>  #include <video/pxa168fb.h>
>  
> +#include <mach/gpio.h>

If you include linux/gpio.h, then if the right configuration symbol
(CONFIG_GENERIC_GPIO) is selected, asm/gpio.h and therefore mach/gpio.h
will be included for you.

> +static inline void spi_gpio_assert(int spi_gpio_cs, int val)
> +{
> +	       if (gpio_is_valid(spi_gpio_cs))
> +		                      gpio_set_value(spi_gpio_cs, val);

This seems to have style problems - please run it through checkpatch.



More information about the linux-arm-kernel mailing list