Skip to content

Commit 120c94a

Browse files
committed
mtd: spi-nor: spansion: Rename method to cypress_nor_get_page_size
The method queries SPINOR_REG_CYPRESS_CFR3V to determine the page size. Rename the method accordingly, s/set/get. Link: https://lore.kernel.org/r/cd3fb2cbc42a9576377ce4506eec72a58240805d.1680849425.git.Takahiro.Kuwano@infineon.com Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
1 parent a9180c2 commit 120c94a

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

drivers/mtd/spi-nor/spansion.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,7 @@ static int cypress_nor_set_addr_mode_nbytes(struct spi_nor *nor)
302302
}
303303

304304
/**
305-
* cypress_nor_set_page_size() - Set page size which corresponds to the flash
306-
* configuration.
305+
* cypress_nor_get_page_size() - Get flash page size configuration.
307306
* @nor: pointer to a 'struct spi_nor'
308307
*
309308
* The BFPT table advertises a 512B or 256B page size depending on part but the
@@ -312,7 +311,7 @@ static int cypress_nor_set_addr_mode_nbytes(struct spi_nor *nor)
312311
*
313312
* Return: 0 on success, -errno otherwise.
314313
*/
315-
static int cypress_nor_set_page_size(struct spi_nor *nor)
314+
static int cypress_nor_get_page_size(struct spi_nor *nor)
316315
{
317316
struct spi_mem_op op =
318317
CYPRESS_NOR_RD_ANY_REG_OP(nor->params->addr_mode_nbytes,
@@ -368,7 +367,7 @@ s25fs256t_post_bfpt_fixup(struct spi_nor *nor,
368367
if (nor->bouncebuf[0])
369368
return -ENODEV;
370369

371-
return cypress_nor_set_page_size(nor);
370+
return cypress_nor_get_page_size(nor);
372371
}
373372

374373
static void s25fs256t_post_sfdp_fixup(struct spi_nor *nor)
@@ -407,7 +406,7 @@ s25hx_t_post_bfpt_fixup(struct spi_nor *nor,
407406
/* Replace Quad Enable with volatile version */
408407
nor->params->quad_enable = cypress_nor_quad_enable_volatile;
409408

410-
return cypress_nor_set_page_size(nor);
409+
return cypress_nor_get_page_size(nor);
411410
}
412411

413412
static void s25hx_t_post_sfdp_fixup(struct spi_nor *nor)
@@ -502,7 +501,7 @@ static int s28hx_t_post_bfpt_fixup(struct spi_nor *nor,
502501
if (ret)
503502
return ret;
504503

505-
return cypress_nor_set_page_size(nor);
504+
return cypress_nor_get_page_size(nor);
506505
}
507506

508507
static void s28hx_t_late_init(struct spi_nor *nor)

0 commit comments

Comments
 (0)