]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: drop lock before reading GPIO direction
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 30 May 2016 15:11:59 +0000 (17:11 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 30 May 2016 15:11:59 +0000 (17:11 +0200)
commit916a218936307b41f2c735d7e673a5f1975be5b3
treef71f325c741cddd9141d9a750f6bf7dec0566454
parenta95e6369a412a263db1cfe45fe4cb56f5e73a0d1
gpio: drop lock before reading GPIO direction

When adding the gpiochip, the GPIO HW drivers' callback get_direction()
could get called in atomic context. Some of the GPIO HW drivers may
sleep when accessing the register.

Move the lock before initializing the descriptors.

Reported-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c