Skip to contentSkip to conversation

mmc: tmio: fix build error if CONFIG_MMC_SDHI is not configured

PATCH In review Axel Lin 2 participants 2 messages Jun 30, 2011

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 mmc: tmio: fix build error if CONFIG_MMC_SDHI is not configured

Fix below build error:

CC drivers/mmc/host/tmio_mmc_dma.o
drivers/mmc/host/tmio_mmc_dma.c:192: error: redefinition of 'tmio_mmc_start_dma' drivers/mmc/host/tmio_mmc.h:111: error: previous definition of 'tmio_mmc_start_dma' was here drivers/mmc/host/tmio_mmc_dma.c:257: error: redefinition of 'tmio_mmc_request_dma' drivers/mmc/host/tmio_mmc.h:116: error: previous definition of 'tmio_mmc_request_dma' was here drivers/mmc/host/tmio_mmc_dma.c:305: error: redefinition of 'tmio_mmc_release_dma' drivers/mmc/host/tmio_mmc.h:122: error: previous definition of 'tmio_mmc_release_dma' was here make[3]: *** [drivers/mmc/host/tmio_mmc_dma.o] Error 1
make[2]: *** [drivers/mmc/host] Error 2
make[1]: *** [drivers/mmc] Error 2
make: *** [drivers] Error 2

---
 drivers/mmc/host/tmio_mmc_dma.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/mmc/host/tmio_mmc_dma.c +4 -0
index a40fdba..4dc563a 100644
@@ -189,6 +189,7 @@ pio:
 		desc, cookie);
 }
 
+#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE)
 void tmio_mmc_start_dma(struct tmio_mmc_host *host,
 			       struct mmc_data *data)
 {
@@ -200,6 +201,7 @@ void tmio_mmc_start_dma(struct tmio_mmc_host *host,
 			tmio_mmc_start_dma_tx(host);
 	}
 }
+#endif
 
 static void tmio_mmc_issue_tasklet_fn(unsigned long priv)
 {
@@ -254,6 +256,7 @@ static bool tmio_mmc_filter(struct dma_chan *chan, void *arg)
 	return true;
 }
 
+#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE)
 void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdata)
 {
 	/* We can only either use DMA for both Tx and Rx or not use it at all */
@@ -319,3 +322,4 @@ void tmio_mmc_release_dma(struct tmio_mmc_host *host)
 		host->bounce_buf = NULL;
 	}
 }
+#endif
Signature · 1 line
1.7.4.1
#1 lore raw

Hi Axel

Quoted 14 lines · Axel Lin

Fix below build error:

CC drivers/mmc/host/tmio_mmc_dma.o
drivers/mmc/host/tmio_mmc_dma.c:192: error: redefinition of 'tmio_mmc_start_dma' drivers/mmc/host/tmio_mmc.h:111: error: previous definition of 'tmio_mmc_start_dma' was here drivers/mmc/host/tmio_mmc_dma.c:257: error: redefinition of 'tmio_mmc_request_dma' drivers/mmc/host/tmio_mmc.h:116: error: previous definition of 'tmio_mmc_request_dma' was here drivers/mmc/host/tmio_mmc_dma.c:305: error: redefinition of 'tmio_mmc_release_dma' drivers/mmc/host/tmio_mmc.h:122: error: previous definition of 'tmio_mmc_release_dma' was here make[3]: *** [drivers/mmc/host/tmio_mmc_dma.o] Error 1
make[2]: *** [drivers/mmc/host] Error 2
make[1]: *** [drivers/mmc] Error 2
make: *** [drivers] Error 2

Quoted 1 line

This is a known bug and a correct fix for it is this:

http://www.mail-archive.com/[email protected]/msg07999.html

No idea, why it still hasn't been applied, Chris?

Thanks
Guennadi

Quoted 42 lines
---
 drivers/mmc/host/tmio_mmc_dma.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/mmc/host/tmio_mmc_dma.c +4 -0
index a40fdba..4dc563a 100644
@@ -189,6 +189,7 @@ pio:
 		desc, cookie);
 }
 
+#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE)
 void tmio_mmc_start_dma(struct tmio_mmc_host *host,
 			       struct mmc_data *data)
 {
@@ -200,6 +201,7 @@ void tmio_mmc_start_dma(struct tmio_mmc_host *host,
 			tmio_mmc_start_dma_tx(host);
 	}
 }
+#endif
 
 static void tmio_mmc_issue_tasklet_fn(unsigned long priv)
 {
@@ -254,6 +256,7 @@ static bool tmio_mmc_filter(struct dma_chan *chan, void *arg)
 	return true;
 }
 
+#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE)
 void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdata)
 {
 	/* We can only either use DMA for both Tx and Rx or not use it at all */
@@ -319,3 +322,4 @@ void tmio_mmc_release_dma(struct tmio_mmc_host *host)
 		host->bounce_buf = NULL;
 	}
 }
+#endif
Signature · 1 line
1.7.4.1

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/