From: Jagan Teki Date: Wed, 19 Aug 2015 09:56:43 +0000 (+0530) Subject: mtd: spi-nor: Use write_sr for write status X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fd7252346b2b005ea5c5f1b432a63dbb9bb05768;p=linux-beck.git 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: Jagan Teki Cc: David Woodhouse Signed-off-by: Brian Norris --- diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 22cca87db9ca..3694f6697344 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -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;