lkml.org 
[lkml]   [2015]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] gpio: return NULL from gpiod_get_optional when GPIOLIB is disabled
On Fri, Feb 20, 2015 at 2:33 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
>> I should have commented at that time, but let's do it now: I agree
>> with the idea, but this leaves the door open to confusing situations
>> in case gpiolib was unintentionally disabled. Could you also add a
>> note in the documentation of this function to explain this behavior,
>> to spare a few headaches to users of this function?
>
> You mean the inline documentation in drivers/gpio/gpiolib.c and
> drivers/gpio/devres.c? I can certainly mention there that is GPIOLIB is disabled
> thy will return NULL unlike the non-optional variants.

I was thinking about Documentation/gpio/consumer.txt, but having a
note in the inline documentation as well certainly makes sense.


\
 
 \ /
  Last update: 2015-02-20 06:41    [W:0.070 / U:2.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site