Skip to contentSkip to conversation

mmc: bfin_sdh: fix unused sg warning on BF51x/BF52x systems

PATCH New [email protected] 1 participant 1 message Mar 5, 2010 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 95/160 mmc: bfin_sdh: fix unused sg warning on BF51x/BF52x systems

From: Mike Frysinger <[email protected]>

The local sg variable is only used with BF54x code.

---

 drivers/mmc/host/bfin_sdh.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/bfin_sdh.c renamed from drivers/mmc/host/bfin_sdh.c~mmc-bfin_sdh-fix-unused-sg-warning-on-bf51x-bf52x-systems +1 -1
diff -puN drivers/mmc/host/bfin_sdh.c~mmc-bfin_sdh-fix-unused-sg-warning-on-bf51x-bf52x-systems drivers/mmc/host/bfin_sdh.c
@@ -115,7 +115,6 @@ static int sdh_setup_data(struct sdh_hos
 	unsigned int length;
 	unsigned int data_ctl;
 	unsigned int dma_cfg;
-	struct scatterlist *sg;
 
 	dev_dbg(mmc_dev(host->mmc), "%s enter flags: 0x%x\n", __func__, data->flags);
 	host->data = data;
@@ -151,6 +150,7 @@ static int sdh_setup_data(struct sdh_hos
 #if defined(CONFIG_BF54x)
 	dma_cfg |= DMAFLOW_ARRAY | NDSIZE_5 | RESTART | WDSIZE_32 | DMAEN;
 	{
+		struct scatterlist *sg;
 		int i;
 		for_each_sg(data->sg, sg, host->dma_len, i) {
 			host->sg_cpu[i].start_addr = sg_dma_address(sg);

_