Messages in this thread | | | From | Alexandre Courbot <> | Date | Fri, 20 Feb 2015 14:37:47 +0900 | Subject | Re: [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.
| |