diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2016-01-26 13:40:00 +0000 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2016-02-29 11:03:18 +0100 |
commit | acc3ad13832ab1aa01bdf9b7e1d76171d1e4d060 (patch) | |
tree | b80e8adc139a4285d59621e0a998b48e2283c98d | |
parent | e66e61cba1fffc53151b5303688f9c077f87104c (diff) | |
download | linux-stable-acc3ad13832ab1aa01bdf9b7e1d76171d1e4d060.tar.gz linux-stable-acc3ad13832ab1aa01bdf9b7e1d76171d1e4d060.tar.bz2 linux-stable-acc3ad13832ab1aa01bdf9b7e1d76171d1e4d060.zip |
mmc: sdhci: clean up coding style in sdhci_adma_table_pre()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/sdhci.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 59ffe3538c7b..bc645bbde1b1 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -465,16 +465,12 @@ static void sdhci_adma_mark_end(void *desc) static int sdhci_adma_table_pre(struct sdhci_host *host, struct mmc_data *data) { - void *desc; - void *align; - dma_addr_t addr; - dma_addr_t align_addr; - int len, offset; - struct scatterlist *sg; - int i; - char *buffer; unsigned long flags; + dma_addr_t addr, align_addr; + void *desc, *align; + char *buffer; + int len, offset, i; /* * The spec does not specify endianness of descriptor table. @@ -495,10 +491,9 @@ static int sdhci_adma_table_pre(struct sdhci_host *host, len = sg_dma_len(sg); /* - * The SDHCI specification states that ADMA - * addresses must be 32-bit aligned. If they - * aren't, then we use a bounce buffer for - * the (up to three) bytes that screw up the + * The SDHCI specification states that ADMA addresses must + * be 32-bit aligned. If they aren't, then we use a bounce + * buffer for the (up to three) bytes that screw up the * alignment. */ offset = (SDHCI_ADMA2_ALIGN - (addr & SDHCI_ADMA2_MASK)) & @@ -542,19 +537,13 @@ static int sdhci_adma_table_pre(struct sdhci_host *host, } if (host->quirks & SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC) { - /* - * Mark the last descriptor as the terminating descriptor - */ + /* Mark the last descriptor as the terminating descriptor */ if (desc != host->adma_table) { desc -= host->desc_sz; sdhci_adma_mark_end(desc); } } else { - /* - * Add a terminating entry. - */ - - /* nop, end, valid */ + /* Add a terminating entry - nop, end, valid */ sdhci_adma_write_desc(host, desc, 0, 0, ADMA2_NOP_END_VALID); } return 0; |