mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-18 11:17:07 +00:00
mmc: atmel-mci: Simplify if(chan) and if(!chan)
Use if(!host->dma.chan) instead of if(chan) and if(!chan) to make code better. Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Link: https://lore.kernel.org/r/20220427120310.838843-1-wanjiabing@vivo.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
0e8bb6666e
commit
83961aacb2
@ -1122,13 +1122,12 @@ atmci_prepare_data_dma(struct atmel_mci *host, struct mmc_data *data)
|
||||
}
|
||||
|
||||
/* If we don't have a channel, we can't do DMA */
|
||||
chan = host->dma.chan;
|
||||
if (chan)
|
||||
host->data_chan = chan;
|
||||
|
||||
if (!chan)
|
||||
if (!host->dma.chan)
|
||||
return -ENODEV;
|
||||
|
||||
chan = host->dma.chan;
|
||||
host->data_chan = chan;
|
||||
|
||||
if (data->flags & MMC_DATA_READ) {
|
||||
host->dma_conf.direction = slave_dirn = DMA_DEV_TO_MEM;
|
||||
maxburst = atmci_convert_chksize(host,
|
||||
|
Loading…
x
Reference in New Issue
Block a user