Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 5008c3ec3f89 ("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>

+6 -6
+6 -6
drivers/mtd/spi-nor/core.c
··· 2345 2345 } 2346 2346 2347 2347 /** 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 2350 2350 *@nor: pointer to a 'struct spi_nor' 2351 2351 *@op: pointer to op template to be checked 2352 2352 * 2353 2353 * Returns 0 if operation is supported, -EOPNOTSUPP otherwise. 2354 2354 */ 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) 2357 2357 { 2358 2358 /* 2359 2359 * First test with 4 address bytes. The opcode itself might ··· 2396 2396 if (spi_nor_protocol_is_dtr(nor->read_proto)) 2397 2397 op.dummy.nbytes *= 2; 2398 2398 2399 - return spi_nor_spimem_check_op(nor, &op); 2399 + return spi_nor_spimem_check_read_pp_op(nor, &op); 2400 2400 } 2401 2401 2402 2402 /** ··· 2414 2414 2415 2415 spi_nor_spimem_setup_op(nor, &op, pp->proto); 2416 2416 2417 - return spi_nor_spimem_check_op(nor, &op); 2417 + return spi_nor_spimem_check_read_pp_op(nor, &op); 2418 2418 } 2419 2419 2420 2420 /**