Commit 134cca65 authored by Christian Lütke-Stetzkamp's avatar Christian Lütke-Stetzkamp Committed by Greg Kroah-Hartman

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: default avatarChristian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6fdbd49b
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment