mtd: spi-nor: Separate preparation and locking
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 28 Mar 2023 15:41:01 +0000 (17:41 +0200)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Wed, 29 Mar 2023 10:46:07 +0000 (13:46 +0300)
commitc154dbd28003d8fcc857d88596b2f0383617d1e7
treef34773e8a609e9b6253bb41357b64f4865cb6069
parent3204634772353ba965ac1f2effa948e32044efbc
mtd: spi-nor: Separate preparation and locking

While this operation will remain a single function call in the end,
let's extract the logic of the [un]prepare calls within their own static
helper. We will soon add new flavors of the *_[un]prepare_and_[un]lock()
helpers, having the preparation logic outside will save us from duplicating
code over and over again.

There is no functional change.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20230328154105.448540-5-miquel.raynal@bootlin.com
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
drivers/mtd/spi-nor/core.c