Skip to content
Commit 8636f19c authored by Alexander Sverdlin's avatar Alexander Sverdlin Committed by Bartosz Golaszewski
Browse files

gpio: sysfs: repair export returning -EPERM on 1st attempt



It would make sense to return -EPERM if the bit was already set (already
used), not if it was cleared. Before this fix pins can only be exported on
the 2nd attempt:

$ echo 522 > /sys/class/gpio/export
sh: write error: Operation not permitted
$ echo 522 > /sys/class/gpio/export

Fixes: 35b54533 ("gpio: remove gpio_lock")
Signed-off-by: default avatarAlexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent 297dc37a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment