]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: rewrite gpiochip_offset_to_desc()
authorAlexandre Courbot <acourbot@nvidia.com>
Tue, 3 Dec 2013 03:31:11 +0000 (12:31 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 4 Dec 2013 12:45:29 +0000 (13:45 +0100)
commit528e04e71b245aba89f2cda1cf46f9ec94e2ec07
tree37176b7a2ccf808cdfc4a4c03be778b6e0980044
parentf471503f0a1e647ebea586ad502d0d3ae2d0a8ef
gpio: rewrite gpiochip_offset_to_desc()

gpiochip_offset_to_desc() was using gpio_to_desc(), which directly
addresses the global GPIO array we are hoping to get rid of someday.
Reimplement it using the descriptor array of the chip itself, after
checking the requested offset is within the valid bounds of the chip.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c