Skip to contentSkip to conversation

mtd: dataflash: Remove use of tx_dma

PATCH Applied Mark Brown 2 participants 2 messages Oct 29, 2014 – Nov 5, 2014 Memory technology devices (MTD)

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/mtd/devices/mtd_dataflash.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mtd/devices/mtd_dataflash.c +3 -3
index dd22ce2cc9ad..0099aba72a8b 100644
@@ -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;
Signature · 1 line
2.1.1
Applied
#1 lore raw
Quoted 6 lines · Mark Brown

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.

Applied to l2-mtd.git. Thanks!

Brian