Re: [PATCH] gpio: fix build error in include/asm-generic/gpio.h

From: Mike Frysinger
Date: Wed Nov 02 2011 - 16:17:11 EST


On Thu, Oct 20, 2011 at 21:38, Hamo wrote:
> Should call the platform-specific __gpio_{get,set}_value
> instead of generic gpio_{get,set}_value
>
> --- a/include/asm-generic/gpio.h
> +++ b/include/asm-generic/gpio.h
>
> Âstatic inline int gpio_get_value_cansleep(unsigned gpio)
> Â{
> Â Â Â Âmight_sleep();
> - Â Â Â return gpio_get_value(gpio);
> + Â Â Â return __gpio_get_value(gpio);
> Â}
>
> Âstatic inline void gpio_set_value_cansleep(unsigned gpio, int value)
> Â{
> Â Â Â Âmight_sleep();
> - Â Â Â gpio_set_value(gpio, value);
> + Â Â Â __gpio_set_value(gpio, value);
> Â}

your change log says very little, and this change looks incorrect to
me. __gpio_xxx type funcs exist in the GPIOLIB case, not in the
!GPIOLIB case. your patch is changing the !GPIOLIB case. so i don't
see how this could work: you're now calling funcs which are not
guaranteed to exist.

i notice this because i'm seeing build failures for somethings that
are using asm-generic/gpio.h, but not GPIOLIB.

so could you explain why exactly you need this and why you think this
is the right route to go ?
-mike
--
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/