]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: max7301: fix driver for use with CONFIG_VMAP_STACK
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 7 Dec 2018 13:07:55 +0000 (13:07 +0000)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 21 Dec 2018 08:23:45 +0000 (09:23 +0100)
commit5d479170ed72673d08fc25ed870a00ea2c4392b0
treea894dff1b03d8d9a526a0f57a378a60fab1b0984
parent1fcdd3388f176c8b557c7ae5320cb3df77321eb5
gpio: max7301: fix driver for use with CONFIG_VMAP_STACK

spi_read() and spi_write() require DMA-safe memory. When
CONFIG_VMAP_STACK is selected, those functions cannot be used
with buffers on stack.

This patch replaces calls to spi_read() and spi_write() by
spi_write_then_read() which doesn't require DMA-safe buffers.

Fixes: f1180b43b6ee ("gpio: gpio driver for max7301 SPI GPIO expander")
Cc: <stable@vger.kernel.org>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-max7301.c