Re: redefinition of devm_gpio_request

From: Geert Uytterhoeven
Date: Thu Jan 10 2013 - 05:52:31 EST


On Thu, Jan 10, 2013 at 10:46 AM, Linus Walleij
<linus.walleij@xxxxxxxxxx> wrote:
> On Sun, Dec 16, 2012 at 2:11 PM, Geert Uytterhoeven
> <geert@xxxxxxxxxxxxxx> wrote:
>> On current linus/HEAD, m68k allmodconfig gives:
>> drivers/gpio/devres.c:52: error: redefinition of âdevm_gpio_requestâ
>> include/linux/gpio.h:99: error: previous definition of
>> âdevm_gpio_requestâ was here
>> drivers/gpio/devres.c:82: error: redefinition of âdevm_gpio_request_oneâ
>> include/linux/gpio.h:111: error: previous definition of
>> âdevm_gpio_request_oneâ was here
>> drivers/gpio/devres.c:114: error: redefinition of âdevm_gpio_freeâ
>> include/linux/gpio.h:129: error: previous definition of
>> âdevm_gpio_freeâ was here
>> make[5]: *** [drivers/gpio/devres.o] Error 1
>>
>> The !CONFIG_GENERIC_GPIO dummy definitions in include/linux/gpio.h conflict
>> with the real ones in drivers/gpio/devres.c.
>> Should devres.c really be compiled if !CONFIG_GENERIC_GPIO?
>
> I've looked at it but I just can't figure this one out :-(
>
> obj-$(CONFIG_GPIOLIB) += gpiolib.o devres.o
>
> GPIOLIB selects GENERIC_GPIO.
>
> So this *should* not be compiled unless GENERIC_GPIO is also
> selected.

I guess it was caused by ssb/bcma selecting GPIOLIB, which got fixed in the
mean time.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
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/