aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-12-11 07:43:05 -0500
committerVinod Koul <vinod.koul@intel.com>2014-03-06 01:05:24 -0500
commit52d6a5ee101bf0e6c1fc5373eebe5c3307e4a0ca (patch)
tree694db935cac517f3b265e13670ec9da9cbf1368c /drivers/dma
parent42e4a12a0d92d09de66d8b5b2c85855b8051c15e (diff)
DMA: shdma: Fix warnings due to declared but unused symbols
Several functions and variables are use on SH_CPU4 or ARM only. Guard their declaration with conditional compilation directives to avoid warnings. Cc: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Cc: Vinod Koul <vinod.koul@intel.com> Cc: dmaengine@vger.kernel.org Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/sh/shdmac.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c
index 0d765c0e21ec..21509876d459 100644
--- a/drivers/dma/sh/shdmac.c
+++ b/drivers/dma/sh/shdmac.c
@@ -443,6 +443,7 @@ static bool sh_dmae_reset(struct sh_dmae_device *shdev)
443 return ret; 443 return ret;
444} 444}
445 445
446#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARM)
446static irqreturn_t sh_dmae_err(int irq, void *data) 447static irqreturn_t sh_dmae_err(int irq, void *data)
447{ 448{
448 struct sh_dmae_device *shdev = data; 449 struct sh_dmae_device *shdev = data;
@@ -453,6 +454,7 @@ static irqreturn_t sh_dmae_err(int irq, void *data)
453 sh_dmae_reset(shdev); 454 sh_dmae_reset(shdev);
454 return IRQ_HANDLED; 455 return IRQ_HANDLED;
455} 456}
457#endif
456 458
457static bool sh_dmae_desc_completed(struct shdma_chan *schan, 459static bool sh_dmae_desc_completed(struct shdma_chan *schan,
458 struct shdma_desc *sdesc) 460 struct shdma_desc *sdesc)
@@ -685,9 +687,12 @@ MODULE_DEVICE_TABLE(of, sh_dmae_of_match);
685static int sh_dmae_probe(struct platform_device *pdev) 687static int sh_dmae_probe(struct platform_device *pdev)
686{ 688{
687 const struct sh_dmae_pdata *pdata; 689 const struct sh_dmae_pdata *pdata;
688 unsigned long irqflags = 0, 690 unsigned long chan_flag[SH_DMAE_MAX_CHANNELS] = {};
689 chan_flag[SH_DMAE_MAX_CHANNELS] = {}; 691 int chan_irq[SH_DMAE_MAX_CHANNELS];
690 int errirq, chan_irq[SH_DMAE_MAX_CHANNELS]; 692#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARM)
693 unsigned long irqflags = 0;
694 int errirq;
695#endif
691 int err, i, irq_cnt = 0, irqres = 0, irq_cap = 0; 696 int err, i, irq_cnt = 0, irqres = 0, irq_cap = 0;
692 struct sh_dmae_device *shdev; 697 struct sh_dmae_device *shdev;
693 struct dma_device *dma_dev; 698 struct dma_device *dma_dev;