lkml.org 
[lkml]   [2011]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] of: of_gpiochip_add is needed only for gpiolib
On Mon, Jan 31, 2011 at 11:25:50PM +0800, Thomas Chou wrote:
> Some gpio drivers may not use gpiolib. In this case, struct gpio_chip
> is not defined and of_gpiochip_add/remove are not needed.
>
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>

I'm not thrilled with the idea of supporting a gpio subsystem that
doesn't use gpiolib. These functions don't even make sense if gpiolib
isn't being used (gpio_chip is a gpiolib construct).

Have you posted a patch that depends on this change? Patch 3 in this
series doesn't seem to need it.

g.

> ---
> include/linux/of_gpio.h | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h
> index 6598c04..fc96af0 100644
> --- a/include/linux/of_gpio.h
> +++ b/include/linux/of_gpio.h
> @@ -71,9 +71,13 @@ static inline unsigned int of_gpio_count(struct device_node *np)
> return 0;
> }
>
> +#ifdef CONFIG_GPIOLIB
> +
> static inline void of_gpiochip_add(struct gpio_chip *gc) { }
> static inline void of_gpiochip_remove(struct gpio_chip *gc) { }
>
> +#endif /* CONFIG_GPIOLIB */
> +
> #endif /* CONFIG_OF_GPIO */
>
> /**
> --
> 1.7.3.5
>


\
 
 \ /
  Last update: 2011-01-31 23:19    [W:0.097 / U:23.284 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site