Re: [PATCH v2 3/3] gpiolib: add gpiod_get() and gpiod_put() functions

2013-10-16 Thread Alex Courbot
On 10/16/2013 04:37 AM, Linus Walleij wrote: On Sat, Oct 12, 2013 at 12:31 AM, Alex Courbot wrote: +#else +static struct device_node *of_find_gpio(struct device *dev, const char *id + unsigned int idx, unsigned long flags) +{ + return ERR_PTR(-ENODEV); +}

Re: [PATCH v2 3/3] gpiolib: add gpiod_get() and gpiod_put() functions

2013-10-16 Thread Linus Walleij
On Sat, Oct 12, 2013 at 12:31 AM, Alex Courbot wrote: >> +#else >> +static struct device_node *of_find_gpio(struct device *dev, const char *id >> + unsigned int idx, unsigned long flags) >> +{ >> + return ERR_PTR(-ENODEV); >> +} >> +#endif > > ... and of cou

Re: [PATCH v2 3/3] gpiolib: add gpiod_get() and gpiod_put() functions

2013-10-11 Thread Alex Courbot
> +#else > +static struct device_node *of_find_gpio(struct device *dev, const char *id > + unsigned int idx, unsigned long flags) > +{ > + return ERR_PTR(-ENODEV); > +} > +#endif ... and of course I forgot to fix the main compilation error. Linus, would you

[PATCH v2 3/3] gpiolib: add gpiod_get() and gpiod_put() functions

2013-10-11 Thread Alexandre Courbot
Add gpiod_get(), gpiod_get_index() and gpiod_put() functions that private safer management of GPIOs. These functions put the GPIO framework in line with the conventions of other frameworks in the kernel, and help ensure every GPIO is declared properly and valid while it is used. Signed-off-by: Al