linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] mtd: spi-nor: Use write_sr for write status
@ 2015-08-19  9:56 Jagan Teki
  2015-08-19  9:56 ` [PATCH 2/3] mtd: spi-nor: Zap unneeded write_enable from write_reg Jagan Teki
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Jagan Teki @ 2015-08-19  9:56 UTC (permalink / raw)
  To: linux-mtd; +Cc: linux-kernel, Jagan Teki, David Woodhouse, Brian Norris

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>
Cc: Brian Norris <computersforpeace@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 47516d3..3e198b4 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -869,8 +869,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;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-09-11 23:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-19  9:56 [PATCH 1/3] mtd: spi-nor: Use write_sr for write status Jagan Teki
2015-08-19  9:56 ` [PATCH 2/3] mtd: spi-nor: Zap unneeded write_enable from write_reg Jagan Teki
2015-09-04 11:28   ` Jagan Teki
2015-09-11 23:14   ` Brian Norris
2015-08-19  9:56 ` [PATCH 3/3] mtd: spi-nor: sf: Add clear flag status register support Jagan Teki
2015-08-19 12:12   ` Hou Zhiqiang
2015-08-19 17:49     ` Jagan Teki
2015-08-20  3:06       ` Hou Zhiqiang
2015-08-21  7:12         ` Jagan Teki
2015-08-25  2:22           ` Hou Zhiqiang
2015-08-26 10:37             ` Jagan Teki
2015-09-04 11:27 ` [PATCH 1/3] mtd: spi-nor: Use write_sr for write status Jagan Teki
2015-09-11 22:59 ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).