Skip to content

Commit 16dec01

Browse files
committed
mtd: spi-nor: Rename spi_nor_spimem_check_op()
This helper really is just a little helper for internal purposes, and is I/O operation oriented, despite its name. It has already been misused in commit 5008c3e ("mtd: spi-nor: core: Check read CR support"), so rename it to clarify its purpose: it is only useful for reads and page programs. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
1 parent ac512cd commit 16dec01

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/mtd/spi-nor/core.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2345,15 +2345,15 @@ int spi_nor_hwcaps_pp2cmd(u32 hwcaps)
23452345
}
23462346

23472347
/**
2348-
* spi_nor_spimem_check_op - check if the operation is supported
2349-
* by controller
2348+
* spi_nor_spimem_check_read_pp_op - check if a read or a page program operation is
2349+
* supported by controller
23502350
*@nor: pointer to a 'struct spi_nor'
23512351
*@op: pointer to op template to be checked
23522352
*
23532353
* Returns 0 if operation is supported, -EOPNOTSUPP otherwise.
23542354
*/
2355-
static int spi_nor_spimem_check_op(struct spi_nor *nor,
2356-
struct spi_mem_op *op)
2355+
static int spi_nor_spimem_check_read_pp_op(struct spi_nor *nor,
2356+
struct spi_mem_op *op)
23572357
{
23582358
/*
23592359
* First test with 4 address bytes. The opcode itself might
@@ -2396,7 +2396,7 @@ static int spi_nor_spimem_check_readop(struct spi_nor *nor,
23962396
if (spi_nor_protocol_is_dtr(nor->read_proto))
23972397
op.dummy.nbytes *= 2;
23982398

2399-
return spi_nor_spimem_check_op(nor, &op);
2399+
return spi_nor_spimem_check_read_pp_op(nor, &op);
24002400
}
24012401

24022402
/**
@@ -2414,7 +2414,7 @@ static int spi_nor_spimem_check_pp(struct spi_nor *nor,
24142414

24152415
spi_nor_spimem_setup_op(nor, &op, pp->proto);
24162416

2417-
return spi_nor_spimem_check_op(nor, &op);
2417+
return spi_nor_spimem_check_read_pp_op(nor, &op);
24182418
}
24192419

24202420
/**

0 commit comments

Comments
 (0)