@@ -2169,6 +2169,8 @@ nand_op_parser_match_pat(const struct nand_op_parser_pattern *pat,
*/
ctx->subop.ninstrs = ninstrs;
ctx->subop.last_instr_end_off = instr_offset;
+ if (ctx->subop.instrs + ninstrs == end && !instr_offset)
+ ctx->subop.is_last = true;
return true;
}
@@ -715,6 +715,7 @@ struct nand_op_instr {
* of the sub-operation
* @last_instr_end_off: offset to end at (excluded) for the last instruction
* of the sub-operation
+ * @is_last: this sub-operation is the last one
*
* Both @first_instr_start_off and @last_instr_end_off only apply to data or
* address instructions.
@@ -728,6 +729,7 @@ struct nand_subop {
unsigned int ninstrs;
unsigned int first_instr_start_off;
unsigned int last_instr_end_off;
+ bool is_last;
};
unsigned int nand_subop_get_addr_start_off(const struct nand_subop *subop,