mtd: rawnand: protect access to rawnand devices while in suspend
authorSean Nyekjaer <sean@geanix.com>
Tue, 8 Feb 2022 08:52:13 +0000 (09:52 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 9 Feb 2022 08:30:21 +0000 (09:30 +0100)
commit8cba323437a49a45756d661f500b324fc2d486fe
treea152aef06ae0d4c676ff34a33ebd3abde6a32ede
parentd430e4acd99f3f2cd5fa30fa6e27dd39261cc967
mtd: rawnand: protect access to rawnand devices while in suspend

Prevent rawnand access while in a suspended state.

Commit 013e6292aaf5 ("mtd: rawnand: Simplify the locking") allows the
rawnand layer to return errors rather than waiting in a blocking wait.

Tested on a iMX6ULL.

Fixes: 013e6292aaf5 ("mtd: rawnand: Simplify the locking")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220208085213.1838273-1-sean@geanix.com
drivers/mtd/nand/raw/nand_base.c
include/linux/mtd/rawnand.h