Skip to content
Commit 0204df47 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Linus Walleij
Browse files

gpiolib: let gpiod_request() return -EPROBE_DEFER



Patch be1a4b brought some improvements to the GPIO error handling code,
but also changed the return value of gpiod_request() when called on a
not yet initialized GPIO descriptor: it now returns -EINVAL instead of
-EPROBE_DEFER, and this affects some drivers.

This patch restores the original behavior for gpiod_request(). It is
safe to do so now that desc_to_gpio() does not rely on the GPIO
descriptor to be initialized. Other functions changed by patch be1a4b
do not see their return value affected, so these are not reverted.

Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Reported-by: default avatarDr. H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 8c0fca81
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment