Files
linux/drivers
Alexandre Courbot a1eabac6e2 gpiolib: safer implementation of desc_to_gpio()
The current implementation of desc_to_gpio() relies on the chip pointer
to be set to a valid value in order to compute the GPIO number. This
was done in the hope that we can get rid of the gpio_desc global array,
but this is not happening anytime soon.

This patch reimplements desc_to_gpio() in a fashion similar to that of
gpio_to_desc(). As a result, desc_to_gpio(gpio_to_desc(gpio)) == gpio is
now always true. This allows to call desc_to_gpio() on non-initialized
descriptors as some error-handling code currently does.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reported-by: Dr. H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-12-17 02:01:29 +00:00
..
2013-05-17 14:31:05 -04:00
2013-07-01 13:38:50 -07:00
2013-11-07 13:28:41 -08:00
2013-07-01 13:40:37 -07:00
2013-05-20 13:38:14 -07:00
2013-05-15 10:58:22 -07:00
2013-06-13 22:12:14 +01:00
2013-04-05 13:28:28 +01:00
2013-06-26 23:08:22 -07:00
2013-12-17 01:35:47 +00:00
2013-06-05 08:54:16 -06:00
2013-06-11 02:46:21 -07:00
2013-07-01 13:40:19 -07:00