]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: mb86s70: Revert "Return error if requesting an already assigned gpio"
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 27 Oct 2017 20:21:48 +0000 (21:21 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 31 Oct 2017 12:13:34 +0000 (13:13 +0100)
commit63c488cb646e7a77bee94c91bee0ccfaef08e0bd
treead1df785b559b2e318aaa2f442ce8e973437cacc
parent48737b31913602e1820bc519cea1deabd38abacf
gpio: mb86s70: Revert "Return error if requesting an already assigned gpio"

Commit 7aa66dba644e ("gpio: mb86s70: Return error if requesting an
already assigned gpio") adds code that infers from the state of the
GPIO Pin Function Register (PFR) whether a GPIO has been assigned
already. This assumes that the pin functions are set to 'peripheral'
when the driver is loaded, which is not guaranteed. Also, the GPIO
layer is perfectly capable of keeping track of which GPIOs have been
assigned already, so we shouldn't need this check in the first place.

This reverts commit 7aa66dba644e57f7893852328536aa43cb4d6e18.

Cc: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-mb86s7x.c