Commit fd725234 authored by Jagan Teki's avatar Jagan Teki Committed by Brian Norris

mtd: spi-nor: Use write_sr for write status

Use existing write_sr() call instead of decoding and
calling nor->write_reg separately.
Signed-off-by: default avatarJagan Teki <jteki@openedev.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent a3d22a55
......@@ -868,8 +868,7 @@ static int macronix_quad_enable(struct spi_nor *nor)
val = read_sr(nor);
write_enable(nor);
nor->cmd_buf[0] = val | SR_QUAD_EN_MX;
nor->write_reg(nor, SPINOR_OP_WRSR, nor->cmd_buf, 1, 0);
write_sr(nor, val | SR_QUAD_EN_MX);
if (spi_nor_wait_till_ready(nor))
return 1;
......
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