gpio: merrifield: Protect irq_ack() and gpio_set() by lock
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 11 Jul 2016 10:06:26 +0000 (13:06 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 22 Jul 2016 13:30:42 +0000 (15:30 +0200)
commitfcce9f14f07db15650d84650293e2207f7dabbfa
tree362bbc0495f56ba9604dd93dc0d016eeb7515119
parentccf6fd6dcc86143002dec6c392d8aa41a6a46353
gpio: merrifield: Protect irq_ack() and gpio_set() by lock

There is a potential race when two threads do the writes to the same register
in parallel.

Prevent out of order in such case by protecting I/O access by spin lock.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-merrifield.c