mtd: spi-nor: Stop exporting spi_nor_restore()
authorTudor Ambarus <tudor.ambarus@linaro.org>
Fri, 31 Mar 2023 07:46:03 +0000 (07:46 +0000)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Tue, 4 Apr 2023 06:43:50 +0000 (09:43 +0300)
Some SPI NOR controllers that used this method were moved to
drivers/spi/. We don't accept new support for the existing SPI NOR
controllers drivers under drivers/mtd/spi-nor/controllers/ and we
encourage their owners to move the drivers under drivers/spi/.
Make spi_nor_restore() private as we're going to use it just in core.c.

Link: https://lore.kernel.org/r/20230331074606.3559258-8-tudor.ambarus@linaro.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Documentation/driver-api/mtd/spi-nor.rst
drivers/mtd/spi-nor/core.c
include/linux/mtd/spi-nor.h

index 4a3adca417fdbbd95db691d574d49179e5d473a4..c22f8c0f7950e1605c78349dba8059126a72c027 100644 (file)
@@ -63,6 +63,3 @@ The main API is spi_nor_scan(). Before you call the hook, a driver should
 initialize the necessary fields for spi_nor{}. Please see
 drivers/mtd/spi-nor/spi-nor.c for detail. Please also refer to spi-fsl-qspi.c
 when you want to write a new driver for a SPI NOR controller.
-Another API is spi_nor_restore(), this is used to restore the status of SPI
-flash chip such as addressing mode. Call it whenever detach the driver from
-device or reboot the system.
index afb56b2cf8feec8f5245b33740fb250ae6f2062f..75a7839af034761f36b28fa192e8e087fc30da7f 100644 (file)
@@ -3291,7 +3291,7 @@ static void spi_nor_put_device(struct mtd_info *mtd)
        module_put(dev->driver->owner);
 }
 
-void spi_nor_restore(struct spi_nor *nor)
+static void spi_nor_restore(struct spi_nor *nor)
 {
        int ret;
 
@@ -3311,7 +3311,6 @@ void spi_nor_restore(struct spi_nor *nor)
        if (nor->flags & SNOR_F_SOFT_RESET)
                spi_nor_soft_reset(nor);
 }
-EXPORT_SYMBOL_GPL(spi_nor_restore);
 
 static const struct flash_info *spi_nor_match_name(struct spi_nor *nor,
                                                   const char *name)
index 82547b4b3708d3c9dc2b4356e4e4e57f9aceb135..cdcfe0fd2e7d624bbb66fefcb87823bce300268e 100644 (file)
@@ -450,10 +450,4 @@ static inline struct device_node *spi_nor_get_flash_node(struct spi_nor *nor)
 int spi_nor_scan(struct spi_nor *nor, const char *name,
                 const struct spi_nor_hwcaps *hwcaps);
 
-/**
- * spi_nor_restore_addr_mode() - restore the status of SPI NOR
- * @nor:       the spi_nor structure
- */
-void spi_nor_restore(struct spi_nor *nor);
-
 #endif