spi: spi-mem: Fix read data size issue
authorYe Li <ye.li@nxp.com>
Wed, 10 Jul 2019 09:23:51 +0000 (09:23 +0000)
committerJagan Teki <jagan@amarulasolutions.com>
Thu, 18 Jul 2019 11:41:16 +0000 (17:11 +0530)
commit535b1fdb8e5e857b9d2747e5f1a1501ec85f327c
treebe0fd3f742320707f12fafc611e58f8da21a02b0
parent0e80dda32c8d724c2a98dbbfb2f1e59762788f15
spi: spi-mem: Fix read data size issue

When slave drivers don't set the max_read_size, the spi-mem should directly
use data.nbytes and not limit to any size. But current logic will limit to
the max_write_size.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/spi/spi-mem.c