The xfersz field of msdc_dma is only set to host->xfer_size and this is also available at the (few) positions, where dma.xfersz is used, so it is removed. Signed-off-by: Christian Lütke-Stetzkamp <christian@xxxxxxxx> --- drivers/staging/mt7621-mmc/mt6575_sd.h | 1 - drivers/staging/mt7621-mmc/sd.c | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/mt7621-mmc/mt6575_sd.h b/drivers/staging/mt7621-mmc/mt6575_sd.h index ee796990e7c5..578f23a06b63 100644 --- a/drivers/staging/mt7621-mmc/mt6575_sd.h +++ b/drivers/staging/mt7621-mmc/mt6575_sd.h @@ -890,7 +890,6 @@ struct msdc_regs { }; struct msdc_dma { - u32 xfersz; /* xfer size in bytes */ u32 sglen; /* size of scatter list */ struct scatterlist *sg; /* I/O scatter list */ u8 mode; /* dma mode */ diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c index 445d8c0e3cf2..bff270dfbe58 100644 --- a/drivers/staging/mt7621-mmc/sd.c +++ b/drivers/staging/mt7621-mmc/sd.c @@ -1259,7 +1259,7 @@ static int msdc_dma_config(struct msdc_host *host, struct msdc_dma *dma) switch (dma->mode) { case MSDC_MODE_DMA_BASIC: - BUG_ON(dma->xfersz > 65535); + BUG_ON(host->xfer_size > 65535); BUG_ON(dma->sglen != 1); sdr_write32(MSDC_DMA_SA, PHYSADDR(sg_dma_address(sg))); sdr_set_field(MSDC_DMA_CTRL, MSDC_DMA_CTRL_LASTBUF, 1); @@ -1332,14 +1332,14 @@ static void msdc_dma_setup(struct msdc_host *host, struct msdc_dma *dma, dma->sg = sg; dma->sglen = sglen; - dma->xfersz = host->xfer_size; if (sglen == 1 && sg_dma_len(sg) <= MAX_DMA_CNT) dma->mode = MSDC_MODE_DMA_BASIC; else dma->mode = MSDC_MODE_DMA_DESC; - N_MSG(DMA, "DMA mode<%d> sglen<%d> xfersz<%d>", dma->mode, dma->sglen, dma->xfersz); + N_MSG(DMA, "DMA mode<%d> sglen<%d> xfersz<%d>", dma->mode, dma->sglen, + host->xfer_size); msdc_dma_config(host, dma); } @@ -2222,7 +2222,7 @@ static irqreturn_t msdc_irq(int irq, void *dev_id) /* transfer complete interrupt */ if (data != NULL) { if (inten & MSDC_INT_XFER_COMPL) { - data->bytes_xfered = host->dma.xfersz; + data->bytes_xfered = host->xfer_size; complete(&host->xfer_done); } -- 2.16.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel