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>
This commit is contained in:
parent
6fdbd49bee
commit
134cca657d
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue