Skip to content

Commit f66a6fd

Browse files
committed
mtd: rawnand: Avoid a typedef
In new code, the use of typedef is discouraged. Turn this one in the raw NAND core into a regular enumeration. Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent 519494a commit f66a6fd

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

drivers/mtd/nand/raw/nand_base.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5099,8 +5099,8 @@ static int of_get_nand_ecc_mode(struct device_node *np)
50995099

51005100
/*
51015101
* For backward compatibility we support few obsoleted values that don't
5102-
* have their mappings into nand_ecc_modes_t anymore (they were merged
5103-
* with other enums).
5102+
* have their mappings into the nand_ecc_mode enum anymore (they were
5103+
* merged with other enums).
51045104
*/
51055105
if (!strcasecmp(pm, "soft_bch"))
51065106
return NAND_ECC_SOFT;

include/linux/mtd/rawnand.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ struct nand_chip;
8383
/*
8484
* Constants for ECC_MODES
8585
*/
86-
typedef enum {
86+
enum nand_ecc_mode {
8787
NAND_ECC_NONE,
8888
NAND_ECC_SOFT,
8989
NAND_ECC_HW,
9090
NAND_ECC_HW_SYNDROME,
9191
NAND_ECC_HW_OOB_FIRST,
9292
NAND_ECC_ON_DIE,
93-
} nand_ecc_modes_t;
93+
};
9494

9595
enum nand_ecc_algo {
9696
NAND_ECC_UNKNOWN,
@@ -362,7 +362,7 @@ static const struct nand_ecc_caps __name = { \
362362
* @write_oob: function to write chip OOB data
363363
*/
364364
struct nand_ecc_ctrl {
365-
nand_ecc_modes_t mode;
365+
enum nand_ecc_mode mode;
366366
enum nand_ecc_algo algo;
367367
int steps;
368368
int size;

include/linux/platform_data/mtd-davinci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ struct davinci_nand_pdata { /* platform_data */
6868
* Newer ones also support 4-bit ECC, but are awkward
6969
* using it with large page chips.
7070
*/
71-
nand_ecc_modes_t ecc_mode;
71+
enum nand_ecc_mode ecc_mode;
7272
u8 ecc_bits;
7373

7474
/* e.g. NAND_BUSWIDTH_16 */

include/linux/platform_data/mtd-nand-s3c2410.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct s3c2410_platform_nand {
4949

5050
unsigned int ignore_unset_ecc:1;
5151

52-
nand_ecc_modes_t ecc_mode;
52+
enum nand_ecc_mode ecc_mode;
5353

5454
int nr_sets;
5555
struct s3c2410_nand_set *sets;

0 commit comments

Comments
 (0)