]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: gpio-pch: Use spinlock for register access protection
authorAxel Lin <axel.lin@gmail.com>
Sun, 29 Jul 2012 02:55:54 +0000 (10:55 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 17 Aug 2012 05:35:42 +0000 (07:35 +0200)
commiteca87e69a53194190380ee22bdcbc922240d3ada
treeef8cb15817321278bc2111c771a3c99560d6a685
parent5a1972253e51ca77851e060a1b4ccbfc5e6d7532
gpio: gpio-pch: Use spinlock for register access protection

gpio_chip.can_sleep is 0, but current code uses mutex in pch_gpio_set
pch_gpio_get and pch_gpio_direction_input functions.
Thus those functions are not callable from interrupt context.
This patch converts mutex into spinlock.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-pch.c