Commit f66a6fd0 authored by Miquel Raynal's avatar Miquel Raynal

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: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/linux-mtd/20200526195633.11543-3-miquel.raynal@bootlin.com
parent 519494a9
...@@ -5099,8 +5099,8 @@ static int of_get_nand_ecc_mode(struct device_node *np) ...@@ -5099,8 +5099,8 @@ static int of_get_nand_ecc_mode(struct device_node *np)
/* /*
* For backward compatibility we support few obsoleted values that don't * For backward compatibility we support few obsoleted values that don't
* have their mappings into nand_ecc_modes_t anymore (they were merged * have their mappings into the nand_ecc_mode enum anymore (they were
* with other enums). * merged with other enums).
*/ */
if (!strcasecmp(pm, "soft_bch")) if (!strcasecmp(pm, "soft_bch"))
return NAND_ECC_SOFT; return NAND_ECC_SOFT;
......
...@@ -83,14 +83,14 @@ struct nand_chip; ...@@ -83,14 +83,14 @@ struct nand_chip;
/* /*
* Constants for ECC_MODES * Constants for ECC_MODES
*/ */
typedef enum { enum nand_ecc_mode {
NAND_ECC_NONE, NAND_ECC_NONE,
NAND_ECC_SOFT, NAND_ECC_SOFT,
NAND_ECC_HW, NAND_ECC_HW,
NAND_ECC_HW_SYNDROME, NAND_ECC_HW_SYNDROME,
NAND_ECC_HW_OOB_FIRST, NAND_ECC_HW_OOB_FIRST,
NAND_ECC_ON_DIE, NAND_ECC_ON_DIE,
} nand_ecc_modes_t; };
enum nand_ecc_algo { enum nand_ecc_algo {
NAND_ECC_UNKNOWN, NAND_ECC_UNKNOWN,
...@@ -362,7 +362,7 @@ static const struct nand_ecc_caps __name = { \ ...@@ -362,7 +362,7 @@ static const struct nand_ecc_caps __name = { \
* @write_oob: function to write chip OOB data * @write_oob: function to write chip OOB data
*/ */
struct nand_ecc_ctrl { struct nand_ecc_ctrl {
nand_ecc_modes_t mode; enum nand_ecc_mode mode;
enum nand_ecc_algo algo; enum nand_ecc_algo algo;
int steps; int steps;
int size; int size;
......
...@@ -68,7 +68,7 @@ struct davinci_nand_pdata { /* platform_data */ ...@@ -68,7 +68,7 @@ struct davinci_nand_pdata { /* platform_data */
* Newer ones also support 4-bit ECC, but are awkward * Newer ones also support 4-bit ECC, but are awkward
* using it with large page chips. * using it with large page chips.
*/ */
nand_ecc_modes_t ecc_mode; enum nand_ecc_mode ecc_mode;
u8 ecc_bits; u8 ecc_bits;
/* e.g. NAND_BUSWIDTH_16 */ /* e.g. NAND_BUSWIDTH_16 */
......
...@@ -49,7 +49,7 @@ struct s3c2410_platform_nand { ...@@ -49,7 +49,7 @@ struct s3c2410_platform_nand {
unsigned int ignore_unset_ecc:1; unsigned int ignore_unset_ecc:1;
nand_ecc_modes_t ecc_mode; enum nand_ecc_mode ecc_mode;
int nr_sets; int nr_sets;
struct s3c2410_nand_set *sets; struct s3c2410_nand_set *sets;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment