Skip to content

Commit 39bdfb7

Browse files
Pratyush Yadavr-vignesh
authored andcommitted
mtd: spi-nor: core: use EOPNOTSUPP instead of ENOTSUPP
ENOTSUPP is not a SUSV4 error code. Using EOPNOTSUPP is preferred in its stead. Signed-off-by: Pratyush Yadav <[email protected]> Signed-off-by: Vignesh Raghavendra <[email protected]> Reviewed-by: Tudor Ambarus <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent f8394f2 commit 39bdfb7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/mtd/spi-nor/core.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2281,7 +2281,7 @@ static int spi_nor_hwcaps_pp2cmd(u32 hwcaps)
22812281
*@nor: pointer to a 'struct spi_nor'
22822282
*@op: pointer to op template to be checked
22832283
*
2284-
* Returns 0 if operation is supported, -ENOTSUPP otherwise.
2284+
* Returns 0 if operation is supported, -EOPNOTSUPP otherwise.
22852285
*/
22862286
static int spi_nor_spimem_check_op(struct spi_nor *nor,
22872287
struct spi_mem_op *op)
@@ -2295,12 +2295,12 @@ static int spi_nor_spimem_check_op(struct spi_nor *nor,
22952295
op->addr.nbytes = 4;
22962296
if (!spi_mem_supports_op(nor->spimem, op)) {
22972297
if (nor->mtd.size > SZ_16M)
2298-
return -ENOTSUPP;
2298+
return -EOPNOTSUPP;
22992299

23002300
/* If flash size <= 16MB, 3 address bytes are sufficient */
23012301
op->addr.nbytes = 3;
23022302
if (!spi_mem_supports_op(nor->spimem, op))
2303-
return -ENOTSUPP;
2303+
return -EOPNOTSUPP;
23042304
}
23052305

23062306
return 0;
@@ -2312,7 +2312,7 @@ static int spi_nor_spimem_check_op(struct spi_nor *nor,
23122312
*@nor: pointer to a 'struct spi_nor'
23132313
*@read: pointer to op template to be checked
23142314
*
2315-
* Returns 0 if operation is supported, -ENOTSUPP otherwise.
2315+
* Returns 0 if operation is supported, -EOPNOTSUPP otherwise.
23162316
*/
23172317
static int spi_nor_spimem_check_readop(struct spi_nor *nor,
23182318
const struct spi_nor_read_command *read)
@@ -2338,7 +2338,7 @@ static int spi_nor_spimem_check_readop(struct spi_nor *nor,
23382338
*@nor: pointer to a 'struct spi_nor'
23392339
*@pp: pointer to op template to be checked
23402340
*
2341-
* Returns 0 if operation is supported, -ENOTSUPP otherwise.
2341+
* Returns 0 if operation is supported, -EOPNOTSUPP otherwise.
23422342
*/
23432343
static int spi_nor_spimem_check_pp(struct spi_nor *nor,
23442344
const struct spi_nor_pp_command *pp)

0 commit comments

Comments
 (0)