Commit c8b3e02e authored by Tomas Winkler's avatar Tomas Winkler Committed by Pierre Ossman

mmc: fix spares errors of sdhci.c

1. sdhci_prepare_data: fix shadowing of count variable
	u8 count
	int count -> sg_cnt;
2.  sdhci_add_host: assignment of integer to pointer
	dma_mask = 0 -> dma_mask = NULL;
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
parent 23af6039
...@@ -672,14 +672,14 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) ...@@ -672,14 +672,14 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
host->ioaddr + SDHCI_ADMA_ADDRESS); host->ioaddr + SDHCI_ADMA_ADDRESS);
} }
} else { } else {
int count; int sg_cnt;
count = dma_map_sg(mmc_dev(host->mmc), sg_cnt = dma_map_sg(mmc_dev(host->mmc),
data->sg, data->sg_len, data->sg, data->sg_len,
(data->flags & MMC_DATA_READ) ? (data->flags & MMC_DATA_READ) ?
DMA_FROM_DEVICE : DMA_FROM_DEVICE :
DMA_TO_DEVICE); DMA_TO_DEVICE);
if (count == 0) { if (sg_cnt == 0) {
/* /*
* This only happens when someone fed * This only happens when someone fed
* us an invalid request. * us an invalid request.
...@@ -1583,7 +1583,7 @@ int sdhci_add_host(struct sdhci_host *host) ...@@ -1583,7 +1583,7 @@ int sdhci_add_host(struct sdhci_host *host)
/* XXX: Hack to get MMC layer to avoid highmem */ /* XXX: Hack to get MMC layer to avoid highmem */
if (!(host->flags & SDHCI_USE_DMA)) if (!(host->flags & SDHCI_USE_DMA))
mmc_dev(host->mmc)->dma_mask = 0; mmc_dev(host->mmc)->dma_mask = NULL;
host->max_clk = host->max_clk =
(caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT; (caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT;
......
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