spi: omap3: fix set_wordlen() reading from incorrect address for CHCONF
authorDavid Rivshin <DRivshin@allworx.com>
Mon, 18 Feb 2019 23:04:29 +0000 (18:04 -0500)
committerTom Rini <trini@konsulko.com>
Thu, 28 Feb 2019 19:21:46 +0000 (14:21 -0500)
commitb8b88e6aff3ea7346a39bfbb27124b275ce56666
tree411f2aabc69a107c4867d981c3d107f0e4c2da29
parent783e66816d101f970b185083377846059d4d577d
spi: omap3: fix set_wordlen() reading from incorrect address for CHCONF

_omap3_spi_set_wordlen() indexed the regs->channel[] array with the
old wordlen (instead of the chipselect number) when reading the current
CHCONF register value. This meant it read from the wrong memory location,
modified that value, and then wrote it back to the correct CHCONF
register. The end result is that most slave configuration settings would
be lost, such as clock divisor, clock/chipselect polarities, etc.

Fixes: 77b8d04854f4 ("spi: omap3: Convert to driver model")
Signed-off-by: David Rivshin <drivshin@allworx.com>
drivers/spi/omap3_spi.c