Commit 8e6070e5 authored by William Zhang's avatar William Zhang Committed by Miquel Raynal
Browse files
parent d4bba150
Loading
Loading
Loading
Loading
+11 −12
Original line number Diff line number Diff line
@@ -2398,10 +2398,10 @@ static int brcmnand_exec_instr(struct brcmnand_host *host, int i,

static int brcmnand_op_is_status(const struct nand_operation *op)
{
	if ((op->ninstrs == 2) &&
	    (op->instrs[0].type == NAND_OP_CMD_INSTR) &&
	    (op->instrs[0].ctx.cmd.opcode == NAND_CMD_STATUS) &&
	    (op->instrs[1].type == NAND_OP_DATA_IN_INSTR))
	if (op->ninstrs == 2 &&
	    op->instrs[0].type == NAND_OP_CMD_INSTR &&
	    op->instrs[0].ctx.cmd.opcode == NAND_CMD_STATUS &&
	    op->instrs[1].type == NAND_OP_DATA_IN_INSTR)
		return 1;

	return 0;
@@ -2409,10 +2409,10 @@ static int brcmnand_op_is_status(const struct nand_operation *op)

static int brcmnand_op_is_reset(const struct nand_operation *op)
{
	if ((op->ninstrs == 2) &&
	    (op->instrs[0].type == NAND_OP_CMD_INSTR) &&
	    (op->instrs[0].ctx.cmd.opcode == NAND_CMD_RESET) &&
	    (op->instrs[1].type == NAND_OP_WAITRDY_INSTR))
	if (op->ninstrs == 2 &&
	    op->instrs[0].type == NAND_OP_CMD_INSTR &&
	    op->instrs[0].ctx.cmd.opcode == NAND_CMD_RESET &&
	    op->instrs[1].type == NAND_OP_WAITRDY_INSTR)
		return 1;

	return 0;
@@ -2440,8 +2440,7 @@ static int brcmnand_exec_op(struct nand_chip *chip,
		*status = ret & 0xFF;

		return 0;
	}
	else if (brcmnand_op_is_reset(op)) {
	} else if (brcmnand_op_is_reset(op)) {
		ret = brcmnand_reset(host);
		if (ret < 0)
			return ret;