]> git.baikalelectronics.ru Git - kernel.git/commit
gpiolib: fix chip order in gpio list
authorJulien Grossholtz <julien.grossholtz@savoirfairelinux.com>
Thu, 7 Jan 2016 21:46:45 +0000 (16:46 -0500)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 13 Jan 2016 09:57:49 +0000 (10:57 +0100)
commita166ebd62c58bb37c8273fe1eb05b4810cf9f339
tree9fff67b9fc70a91072fdb1f482fe12eee7b5f748
parent3705c7b49c23b353d06f5116c389684e16dd1929
gpiolib: fix chip order in gpio list

In some situations the gpio_list order is not correct.
As a consequence gpiochip_find_base returns the same
base number twice. This happens when a first ship is added
with manual base number, then other ships are added using
automatic base number.

To prevent this behaviour, this patch add the new chip after
the last element of the gpio list.

Signed-off-by: Julien Grossholtz <julien.grossholtz@savoirfairelinux.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c