mtd: spi-nor: Use write_sr for write status
authorJagan Teki <jteki@openedev.com>
Wed, 19 Aug 2015 09:56:43 +0000 (15:26 +0530)
committerBrian Norris <computersforpeace@gmail.com>
Fri, 11 Sep 2015 22:53:48 +0000 (15:53 -0700)
Use existing write_sr() call instead of decoding and
calling nor->write_reg separately.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/spi-nor/spi-nor.c

index 22cca87db9caea289519e65d26dad1e28f0ddcb6..3694f6697344ce6e23d97c191986235b17af83ea 100644 (file)
@@ -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;