Skip to content
Unverified Commit 81f13f21 authored by Chuanhong Guo's avatar Chuanhong Guo Committed by Mark Brown
Browse files

spi: spi-mtk-nor: fix op checks in supports_op



commit a59b2c7c ("spi: spi-mtk-nor: support standard spi properties")
tries to inverse the logic of supports_op when adding
spi_mem_default_supports_op check, but it didn't get it done properly.
There are two regressions introduced by this commit:
1. reading ops supported by program mode is rejected.
2. all ops with special controller routines are incorrectly further
   checked against program mode.

This commits inverses the logic back:
1. check spi_mem_default_supports_op and reject unsupported ops first.
2. return true for ops with special controller routines.
3. check the left ops against controller program mode.

Fixes: a59b2c7c ("spi: spi-mtk-nor: support standard spi properties")
Signed-off-by: default avatarChuanhong Guo <gch981213@gmail.com>
Link: https://lore.kernel.org/r/20200924152730.733243-4-gch981213@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent fd806575
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment