Although drivers do not directly get access to the private data of instruction patterns, let's use unnamed union field to be consistent with nand_op_instr. Signed-off-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx> --- drivers/mtd/nand/raw/nand_base.c | 12 ++++++------ include/linux/mtd/rawnand.h | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index 3b620cd..d29de69 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -1995,24 +1995,24 @@ nand_op_parser_must_split_instr(const struct nand_op_parser_pattern_elem *pat, { switch (pat->type) { case NAND_OP_ADDR_INSTR: - if (!pat->ctx.addr.maxcycles) + if (!pat->addr.maxcycles) break; if (instr->addr.naddrs - *start_offset > - pat->ctx.addr.maxcycles) { - *start_offset += pat->ctx.addr.maxcycles; + pat->addr.maxcycles) { + *start_offset += pat->addr.maxcycles; return true; } break; case NAND_OP_DATA_IN_INSTR: case NAND_OP_DATA_OUT_INSTR: - if (!pat->ctx.data.maxlen) + if (!pat->data.maxlen) break; if (instr->data.len - *start_offset > - pat->ctx.data.maxlen) { - *start_offset += pat->ctx.data.maxlen; + pat->data.maxlen) { + *start_offset += pat->data.maxlen; return true; } break; diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h index b606ed3..7abb605 100644 --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h @@ -741,7 +741,7 @@ struct nand_op_parser_pattern_elem { union { struct nand_op_parser_addr_constraints addr; struct nand_op_parser_data_constraints data; - } ctx; + }; }; #define NAND_OP_PARSER_PAT_CMD_ELEM(_opt) \ @@ -754,21 +754,21 @@ struct nand_op_parser_pattern_elem { { \ .type = NAND_OP_ADDR_INSTR, \ .optional = _opt, \ - .ctx.addr.maxcycles = _maxcycles, \ + .addr.maxcycles = _maxcycles, \ } #define NAND_OP_PARSER_PAT_DATA_IN_ELEM(_opt, _maxlen) \ { \ .type = NAND_OP_DATA_IN_INSTR, \ .optional = _opt, \ - .ctx.data.maxlen = _maxlen, \ + .data.maxlen = _maxlen, \ } #define NAND_OP_PARSER_PAT_DATA_OUT_ELEM(_opt, _maxlen) \ { \ .type = NAND_OP_DATA_OUT_INSTR, \ .optional = _opt, \ - .ctx.data.maxlen = _maxlen, \ + .data.maxlen = _maxlen, \ } #define NAND_OP_PARSER_PAT_WAITRDY_ELEM(_opt) \ -- 2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/