aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@free-electrons.com>2018-01-19 13:11:27 -0500
committerBoris Brezillon <boris.brezillon@free-electrons.com>2018-01-20 04:39:02 -0500
commitc1a72e2dbb4abb90bd408480d7c48ba40cb799ce (patch)
tree60ee614bf74b313dfcd00937b8e9af403e878eb0 /include/linux/mtd
parentc495a9275eeca0bbc9358de7200e58184e864aeb (diff)
mtd: nand: Fix build issues due to an anonymous union
GCC-4.4.4 raises errors when assigning a parameter in an anonymous union, leading to this kind of failure: drivers/mtd/nand/marvell_nand.c:1936: warning: missing braces around initializer warning: (near initialization for '(anonymous)[1].<anonymous>') error: unknown field 'data' specified in initializer error: unknown field 'addr' specified in initializer Work around the situation by naming these unions. Fixes: 8878b126df76 ("mtd: nand: add ->exec_op() implementation") Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com> Tested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/rawnand.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index 469dc724f5df..56c5570aadbe 100644
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
@@ -962,7 +962,7 @@ struct nand_op_parser_pattern_elem {
962 union { 962 union {
963 struct nand_op_parser_addr_constraints addr; 963 struct nand_op_parser_addr_constraints addr;
964 struct nand_op_parser_data_constraints data; 964 struct nand_op_parser_data_constraints data;
965 }; 965 } ctx;
966}; 966};
967 967
968#define NAND_OP_PARSER_PAT_CMD_ELEM(_opt) \ 968#define NAND_OP_PARSER_PAT_CMD_ELEM(_opt) \
@@ -975,21 +975,21 @@ struct nand_op_parser_pattern_elem {
975 { \ 975 { \
976 .type = NAND_OP_ADDR_INSTR, \ 976 .type = NAND_OP_ADDR_INSTR, \
977 .optional = _opt, \ 977 .optional = _opt, \
978 .addr.maxcycles = _maxcycles, \ 978 .ctx.addr.maxcycles = _maxcycles, \
979 } 979 }
980 980
981#define NAND_OP_PARSER_PAT_DATA_IN_ELEM(_opt, _maxlen) \ 981#define NAND_OP_PARSER_PAT_DATA_IN_ELEM(_opt, _maxlen) \
982 { \ 982 { \
983 .type = NAND_OP_DATA_IN_INSTR, \ 983 .type = NAND_OP_DATA_IN_INSTR, \
984 .optional = _opt, \ 984 .optional = _opt, \
985 .data.maxlen = _maxlen, \ 985 .ctx.data.maxlen = _maxlen, \
986 } 986 }
987 987
988#define NAND_OP_PARSER_PAT_DATA_OUT_ELEM(_opt, _maxlen) \ 988#define NAND_OP_PARSER_PAT_DATA_OUT_ELEM(_opt, _maxlen) \
989 { \ 989 { \
990 .type = NAND_OP_DATA_OUT_INSTR, \ 990 .type = NAND_OP_DATA_OUT_INSTR, \
991 .optional = _opt, \ 991 .optional = _opt, \
992 .data.maxlen = _maxlen, \ 992 .ctx.data.maxlen = _maxlen, \
993 } 993 }
994 994
995#define NAND_OP_PARSER_PAT_WAITRDY_ELEM(_opt) \ 995#define NAND_OP_PARSER_PAT_WAITRDY_ELEM(_opt) \