mtd: spi-nor: Use write_sr for write status
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Nov 6 10:59:02 PST 2015
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=fd7252346b2b005ea5c5f1b432a63dbb9bb05768
Commit: fd7252346b2b005ea5c5f1b432a63dbb9bb05768
Parent: a3d22a55cda99bcd151836f39ddd329af6cb1d30
Author: Jagan Teki <jteki at openedev.com>
AuthorDate: Wed Aug 19 15:26:43 2015 +0530
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Fri Sep 11 15:53:48 2015 -0700
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 <jteki at openedev.com>
Cc: David Woodhouse <dwmw2 at infradead.org>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/spi-nor/spi-nor.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 22cca87..3694f66 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;
More information about the linux-mtd-cvs
mailing list