Subject: Re: [gpio:for-next 67/67] pch_gbe_main.c:undefined reference to `devm_gpio_request_one'

From: David Cohen <[email-masked]>
Date: Fri, 25 Oct 2013 14:25:54 -0700

On 10/25/2013 02:21 PM, David Cohen wrote:
> Hi Linus,
>
> On 10/25/2013 03:49 AM, Linus Walleij wrote:
>> On Fri, Oct 25, 2013 at 12:41 PM, Linus Walleij
>> <[email-masked]> wrote:
>>
>>>> I wouldn't object to adding a dependency to GPIO_PCH and GPIOLIB
>>>> unconditionally for PCH_GBE as GPIO_PCH is the same chip... but I don't
>>>> know if David Miller would be amenable to that.
>>>
>>> Well we should probably just stick a dependency to GPIOLIB in there.
>>>
>>> - It #includes <linux/gpio.h>
>>> - It uses gpiolib functions to do something vital
>>>
>>> It was just happy that dummy versions were slotted in until now.
>>
>> ...or maybe I'm just confused now?
>>
>> Should we just add a static inline stub of devm_gpio_request_one()?
>
> I am not familiar with the HW. But checking the code, platform
> initialization should fail with a dummy devm_gpio_request_one()
> implementation. IMO it makes more sense to depend on GPIOLIB.

Actually, forget about it. Despite driver_data->platform_init() may
return error, probe() never checks for it. I think the driver must be
fixed, but in meanwhile a static inline stub seems reasonable.

> Br, David Cohen