Re: [PATCH] gpio: remove gpio_descs global array

2014-12-02 Thread Linus Walleij
On Tue, Dec 2, 2014 at 2:25 PM, Alexandre Courbot wrote: > On Tue, Dec 2, 2014 at 7:32 PM, Geert Uytterhoeven > wrote: >> This patch changes a return value from -EPROBE_DEFER to -EINVAL in >> regulator-gpio when a GPIO cannot be found yet, causing probe failures >> on r8a7791/koelsch: > > Hi

Re: [PATCH] gpio: remove gpio_descs global array

2014-12-02 Thread Alexandre Courbot
On Tue, Dec 2, 2014 at 7:32 PM, Geert Uytterhoeven wrote: > Hi Linus, Alexandre, > > On Fri, Nov 28, 2014 at 11:29 AM, Linus Walleij > wrote: >> On Wed, Nov 19, 2014 at 8:51 AM, Alexandre Courbot >> wrote: >>> Replace the ARCH_NR_GPIOS-sized static array of GPIO descriptors by >>>

Re: [PATCH] gpio: remove gpio_descs global array

2014-12-02 Thread Geert Uytterhoeven
Hi Linus, Alexandre, On Fri, Nov 28, 2014 at 11:29 AM, Linus Walleij wrote: > On Wed, Nov 19, 2014 at 8:51 AM, Alexandre Courbot > wrote: >> Replace the ARCH_NR_GPIOS-sized static array of GPIO descriptors by >> dynamically-allocated arrays for each GPIO chip. >> >> This change makes

Re: [PATCH] gpio: remove gpio_descs global array

2014-12-02 Thread Geert Uytterhoeven
Hi Linus, Alexandre, On Fri, Nov 28, 2014 at 11:29 AM, Linus Walleij linus.wall...@linaro.org wrote: On Wed, Nov 19, 2014 at 8:51 AM, Alexandre Courbot acour...@nvidia.com wrote: Replace the ARCH_NR_GPIOS-sized static array of GPIO descriptors by dynamically-allocated arrays for each GPIO

Re: [PATCH] gpio: remove gpio_descs global array

2014-12-02 Thread Alexandre Courbot
On Tue, Dec 2, 2014 at 7:32 PM, Geert Uytterhoeven ge...@linux-m68k.org wrote: Hi Linus, Alexandre, On Fri, Nov 28, 2014 at 11:29 AM, Linus Walleij linus.wall...@linaro.org wrote: On Wed, Nov 19, 2014 at 8:51 AM, Alexandre Courbot acour...@nvidia.com wrote: Replace the ARCH_NR_GPIOS-sized

Re: [PATCH] gpio: remove gpio_descs global array

2014-12-02 Thread Linus Walleij
On Tue, Dec 2, 2014 at 2:25 PM, Alexandre Courbot gnu...@gmail.com wrote: On Tue, Dec 2, 2014 at 7:32 PM, Geert Uytterhoeven ge...@linux-m68k.org wrote: This patch changes a return value from -EPROBE_DEFER to -EINVAL in regulator-gpio when a GPIO cannot be found yet, causing probe failures

Re: [PATCH] gpio: remove gpio_descs global array

2014-11-28 Thread Linus Walleij
On Wed, Nov 19, 2014 at 8:51 AM, Alexandre Courbot wrote: > Replace the ARCH_NR_GPIOS-sized static array of GPIO descriptors by > dynamically-allocated arrays for each GPIO chip. > > This change makes gpio_to_desc() perform in O(n) (where n is the number > of GPIO chips registered) instead of

Re: [PATCH] gpio: remove gpio_descs global array

2014-11-28 Thread Linus Walleij
On Wed, Nov 19, 2014 at 8:51 AM, Alexandre Courbot acour...@nvidia.com wrote: Replace the ARCH_NR_GPIOS-sized static array of GPIO descriptors by dynamically-allocated arrays for each GPIO chip. This change makes gpio_to_desc() perform in O(n) (where n is the number of GPIO chips registered)

[PATCH] gpio: remove gpio_descs global array

2014-11-18 Thread Alexandre Courbot
Replace the ARCH_NR_GPIOS-sized static array of GPIO descriptors by dynamically-allocated arrays for each GPIO chip. This change makes gpio_to_desc() perform in O(n) (where n is the number of GPIO chips registered) instead of O(1), however since n is rarely bigger than 1 or 2 no noticeable

[PATCH] gpio: remove gpio_descs global array

2014-11-18 Thread Alexandre Courbot
Replace the ARCH_NR_GPIOS-sized static array of GPIO descriptors by dynamically-allocated arrays for each GPIO chip. This change makes gpio_to_desc() perform in O(n) (where n is the number of GPIO chips registered) instead of O(1), however since n is rarely bigger than 1 or 2 no noticeable