]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: spi-nor: Check bus width while setting QE bit
authorHsin-Yi Wang <hsinyi@chromium.org>
Fri, 18 Aug 2023 06:42:23 +0000 (14:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:42:58 +0000 (09:42 +0200)
commiteaf4c78982aee543c33c5b7675c2ab34b7fae646
tree8deb311f7f6063bf5d53918a51c56025bc6b3c0f
parent3e313b6c470d9748232327348d4c39f03ca64367
mtd: spi-nor: Check bus width while setting QE bit

[ Upstream commit f01d8155a92e33cdaa85d20bfbe6c441907b3c1f ]

spi_nor_write_16bit_sr_and_check() should also check if bus width is
4 before setting QE bit.

Fixes: 39d1e3340c73 ("mtd: spi-nor: Fix clearing of QE bit on lock()/unlock()")
Suggested-by: Michael Walle <michael@walle.cc>
Suggested-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20230818064524.1229100-2-hsinyi@chromium.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/spi-nor/core.c