mtd: dataflash: Remove use of tx_dma

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Dec 15 19:59:05 PST 2014


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=7a95db03040e8b11de21f367e2f1a3457c7a37b4
Commit:     7a95db03040e8b11de21f367e2f1a3457c7a37b4
Parent:     b94ed087744c5bc287d2ed706b476693df07151d
Author:     Mark Brown <broonie at kernel.org>
AuthorDate: Wed Oct 29 12:27:32 2014 +0000
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Nov 5 12:57:24 2014 -0800

    mtd: dataflash: Remove use of tx_dma
    
    We are trying to remove the legacy tx_dma and rx_dma fields from the
    spi_transfer structure. Currently dataflash uses tx_dma but only to make
    sure that it's set to 0 so we can remove this use by replacing with a
    zero initialisation of the entire spi_transfer struct.
    
    Signed-off-by: Mark Brown <broonie at kernel.org>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/devices/mtd_dataflash.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index dd22ce2..0099aba 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -149,7 +149,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
 {
 	struct dataflash	*priv = mtd->priv;
 	struct spi_device	*spi = priv->spi;
-	struct spi_transfer	x = { .tx_dma = 0, };
+	struct spi_transfer	x = { };
 	struct spi_message	msg;
 	unsigned		blocksize = priv->page_size << 3;
 	uint8_t			*command;
@@ -235,7 +235,7 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len,
 			       size_t *retlen, u_char *buf)
 {
 	struct dataflash	*priv = mtd->priv;
-	struct spi_transfer	x[2] = { { .tx_dma = 0, }, };
+	struct spi_transfer	x[2] = { };
 	struct spi_message	msg;
 	unsigned int		addr;
 	uint8_t			*command;
@@ -301,7 +301,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
 {
 	struct dataflash	*priv = mtd->priv;
 	struct spi_device	*spi = priv->spi;
-	struct spi_transfer	x[2] = { { .tx_dma = 0, }, };
+	struct spi_transfer	x[2] = { };
 	struct spi_message	msg;
 	unsigned int		pageaddr, addr, offset, writelen;
 	size_t			remaining = len;



More information about the linux-mtd-cvs mailing list