[U-Boot] [PATCH v7 77/87] mtd: spi-nor: Rename spi_nor_addr to m25p_addr2cmd

Jagan Teki jteki at openedev.com
Tue Mar 22 08:38:29 CET 2016


opcode handling is part of spi_nor_addr routine, since
it's been part of m25p80 so rename the function related
to that file name.

Cc: Simon Glass <sjg at chromium.org>
Cc: Bin Meng <bmeng.cn at gmail.com>
Cc: Mugunthan V N <mugunthanvnm at ti.com>
Cc: Michal Simek <michal.simek at xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur at xilinx.com>
Signed-off-by: Jagan Teki <jteki at openedev.com>
---
 drivers/mtd/spi-nor/m25p80.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/spi-nor/m25p80.c b/drivers/mtd/spi-nor/m25p80.c
index 560e5b2..a6e9cfe 100644
--- a/drivers/mtd/spi-nor/m25p80.c
+++ b/drivers/mtd/spi-nor/m25p80.c
@@ -27,7 +27,7 @@ struct m25p {
 	u8			command[MAX_CMD_SIZE];
 };
 
-static void spi_nor_addr(u32 addr, u8 *cmd)
+static void m25p_addr2cmd(u32 addr, u8 *cmd)
 {
 	/* cmd[0] is actual command */
 	cmd[1] = addr >> 16;
@@ -136,7 +136,7 @@ static int m25p80_read(struct spi_nor *nor, loff_t from, size_t len,
 	}
 
 	flash->command[0] = nor->read_opcode;
-	spi_nor_addr(from, flash->command);
+	m25p_addr2cmd(from, flash->command);
 
 	if (nor->flags & SNOR_F_U_PAGE)
 		spi->flags |= SPI_XFER_U_PAGE;
@@ -171,7 +171,7 @@ static int m25p80_write(struct spi_nor *nor, loff_t to, size_t len,
 		cmd_sz = 1;
 
 	flash->command[0] = nor->program_opcode;
-	spi_nor_addr(to, flash->command);
+	m25p_addr2cmd(to, flash->command);
 
 	if (nor->flags & SNOR_F_U_PAGE)
 		spi->flags |= SPI_XFER_U_PAGE;
@@ -204,7 +204,7 @@ static int m25p80_erase(struct spi_nor *nor, loff_t offset)
 	}
 
 	flash->command[0] = nor->erase_opcode;
-	spi_nor_addr(offset, flash->command);
+	m25p_addr2cmd(offset, flash->command);
 
 	if (nor->flags & SNOR_F_U_PAGE)
 		spi->flags |= SPI_XFER_U_PAGE;
-- 
1.9.1



More information about the U-Boot mailing list