summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi-nor/swp.c
diff options
context:
space:
mode:
authorTudor Ambarus <tudor.ambarus@microchip.com>2021-12-07 16:02:43 +0200
committerTudor Ambarus <tudor.ambarus@microchip.com>2021-12-07 17:05:10 +0200
commitff67592cbdfc74c4237b2d02c4cb50a5eef56ff1 (patch)
tree72db7da2b1269edf45eb497f5c8e5215656d84d7 /drivers/mtd/spi-nor/swp.c
parenteb726c322020b95bfc1fbf0e83d0fd41c2500e96 (diff)
mtd: spi-nor: Introduce spi_nor_set_mtd_info()
Used to init all the mtd_info fields. Move the mtd_info init the last thing in the spi_nor_scan(), so that we avoid superfluous initialization of the mtd_info fields in case of errors. While here use common naming scheme for functions that are setting mtd_info fields: s/spi_nor_register_locking_ops/spi_nor_set_mtd_locking_ops s/spi_nor_otp_init/spi_nor_set_mtd_otp_ops The functions names are self explanatory, get rid of the comment for the OTP function. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Michael Walle <michael@walle.cc> Reviewed-by: Pratyush Yadav <p.yadav@ti.com> Link: https://lore.kernel.org/r/20211207140254.87681-4-tudor.ambarus@microchip.com
Diffstat (limited to 'drivers/mtd/spi-nor/swp.c')
-rw-r--r--drivers/mtd/spi-nor/swp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/spi-nor/swp.c b/drivers/mtd/spi-nor/swp.c
index 8594bcbb7dbe..1f178313ba8f 100644
--- a/drivers/mtd/spi-nor/swp.c
+++ b/drivers/mtd/spi-nor/swp.c
@@ -414,7 +414,7 @@ void spi_nor_try_unlock_all(struct spi_nor *nor)
dev_dbg(nor->dev, "Failed to unlock the entire flash memory array\n");
}
-void spi_nor_register_locking_ops(struct spi_nor *nor)
+void spi_nor_set_mtd_locking_ops(struct spi_nor *nor)
{
struct mtd_info *mtd = &nor->mtd;