Revert "[MTD] m25p80.c code cleanup"
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon Oct 20 04:59:02 EDT 2008
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=8a1a6272057e2ad90ab531a70330165888866e60
Commit: 8a1a6272057e2ad90ab531a70330165888866e60
Parent: 7d28e0d1e55442d198f7c35626d2c460ac04cab2
Author: David Woodhouse <David.Woodhouse at intel.com>
AuthorDate: Mon Oct 20 09:26:16 2008 +0100
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Mon Oct 20 09:28:09 2008 +0100
Revert "[MTD] m25p80.c code cleanup"
This reverts commit 75d0ee2202b5740e94e913d8a52f91c6557c4c81.
Although it seems ObviouslyCorrect™, the spi_write() call uses DMA,
while spi_write_then_read() does not. Since our buffer is on the stack,
we must use the latter even though we don't actually want to read
anything back.
Pointed out by David Brownell <david-b at pacbell.net>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/devices/m25p80.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 697a3a2..76a7675 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -134,7 +134,7 @@ static inline int write_enable(struct m25p *flash)
{
u8 code = OPCODE_WREN;
- return spi_write(flash->spi, &code, 1);
+ return spi_write_then_read(flash->spi, &code, 1, NULL, 0);
}
More information about the linux-mtd-cvs
mailing list