diff options
author | Christian Lütke-Stetzkamp <christian@lkamp.de> | 2018-04-18 17:27:36 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-23 15:37:49 +0200 |
commit | 134cca657d8e04e80a1db988faf485c8cfcef0a6 (patch) | |
tree | 868269839f081be3fdfc5bd44d71289998014d54 /drivers | |
parent | 6fdbd49beec3e690a715bbdd4a3f67808d5406dd (diff) |
staging: mt7621-mmc: Remove unused field xfersz from msdc_dma
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@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/mt7621-mmc/mt6575_sd.h | 1 | ||||
-rw-r--r-- | 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 2e63fb7ba66d..79436d36b99d 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); } @@ -2221,7 +2221,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); } |