spi: ti-qspi: Fix mmap read when more than one CS in use
authorVignesh R <vigneshr@ti.com>
Tue, 29 Jan 2019 07:44:22 +0000 (13:14 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 19:09:57 +0000 (20:09 +0100)
commite51c5ec99597005400184fcd165d71c875bba367
tree9bf9d86e6d8f6ccdbba9a0c0f5ca26af6f0d0f4a
parent0d98ecb141a65ccea0ddef82b5cf3a1d5a777695
spi: ti-qspi: Fix mmap read when more than one CS in use

commit 673c865efbdc5fec3cc525c46d71844d42c60072 upstream.

Commit 4dea6c9b0b64 ("spi: spi-ti-qspi: add mmap mode read support") has
has got order of parameter wrong when calling regmap_update_bits() to
select CS for mmap access. Mask and value arguments are interchanged.
Code will work on a system with single slave, but fails when more than
one CS is in use. Fix this by correcting the order of parameters when
calling regmap_update_bits().

Fixes: 4dea6c9b0b64 ("spi: spi-ti-qspi: add mmap mode read support")
Cc: stable@vger.kernel.org
Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-ti-qspi.c