Skip to content

Commit 7fe1b00

Browse files
committed
mtd: spi-nor: Stop exporting spi_nor_restore()
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>
1 parent 4e53ab0 commit 7fe1b00

3 files changed

Lines changed: 1 addition & 11 deletions

File tree

Documentation/driver-api/mtd/spi-nor.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,3 @@ The main API is spi_nor_scan(). Before you call the hook, a driver should
6363
initialize the necessary fields for spi_nor{}. Please see
6464
drivers/mtd/spi-nor/spi-nor.c for detail. Please also refer to spi-fsl-qspi.c
6565
when you want to write a new driver for a SPI NOR controller.
66-
Another API is spi_nor_restore(), this is used to restore the status of SPI
67-
flash chip such as addressing mode. Call it whenever detach the driver from
68-
device or reboot the system.

drivers/mtd/spi-nor/core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3291,7 +3291,7 @@ static void spi_nor_put_device(struct mtd_info *mtd)
32913291
module_put(dev->driver->owner);
32923292
}
32933293

3294-
void spi_nor_restore(struct spi_nor *nor)
3294+
static void spi_nor_restore(struct spi_nor *nor)
32953295
{
32963296
int ret;
32973297

@@ -3311,7 +3311,6 @@ void spi_nor_restore(struct spi_nor *nor)
33113311
if (nor->flags & SNOR_F_SOFT_RESET)
33123312
spi_nor_soft_reset(nor);
33133313
}
3314-
EXPORT_SYMBOL_GPL(spi_nor_restore);
33153314

33163315
static const struct flash_info *spi_nor_match_name(struct spi_nor *nor,
33173316
const char *name)

include/linux/mtd/spi-nor.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,4 @@ static inline struct device_node *spi_nor_get_flash_node(struct spi_nor *nor)
450450
int spi_nor_scan(struct spi_nor *nor, const char *name,
451451
const struct spi_nor_hwcaps *hwcaps);
452452

453-
/**
454-
* spi_nor_restore_addr_mode() - restore the status of SPI NOR
455-
* @nor: the spi_nor structure
456-
*/
457-
void spi_nor_restore(struct spi_nor *nor);
458-
459453
#endif

0 commit comments

Comments
 (0)