Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mtd: spi-nor: core: correct the op.dummy.nbytes when check read operations

When check read operation, need to setting the op.dummy.nbytes based
on current read operation rather than the nor->read_proto.

Fixes: 0e30f47232ab ("mtd: spi-nor: add support for DTR protocol")
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org>

authored by

Haibo Chen and committed by
Pratyush Yadav (Google)
756564a5 6de23f81

+1 -1
+1 -1
drivers/mtd/spi-nor/core.c
··· 2393 2393 /* convert the dummy cycles to the number of bytes */ 2394 2394 op.dummy.nbytes = (read->num_mode_clocks + read->num_wait_states) * 2395 2395 op.dummy.buswidth / 8; 2396 - if (spi_nor_protocol_is_dtr(nor->read_proto)) 2396 + if (spi_nor_protocol_is_dtr(read->proto)) 2397 2397 op.dummy.nbytes *= 2; 2398 2398 2399 2399 return spi_nor_spimem_check_op(nor, &op);