diff mbox

dmaengine: mmp_tdma: fix the 'pointer from integer' warnings

Message ID 1385631393-9764-1-git-send-email-vinod.koul@intel.com (mailing list archive)
State Accepted
Commit 9d0f1fa6e104
Headers show

Commit Message

Vinod Koul Nov. 28, 2013, 9:36 a.m. UTC
the driver is using unsigned long type for storing the channel register base
"reg_base", this leads to bunch of warns when we try to use this as pointer. So
better use an iomem pointer type for this variable

drivers/dma/mmp_tdma.c: In function 'mmp_tdma_chan_set_desc':
drivers/dma/mmp_tdma.c:143: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
drivers/dma/mmp_tdma.c:144: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast
drivers/dma/mmp_tdma.c:144: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
drivers/dma/mmp_tdma.c: In function 'mmp_tdma_enable_chan':
drivers/dma/mmp_tdma.c:151: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
drivers/dma/mmp_tdma.c:153: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast
drivers/dma/mmp_tdma.c:153: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
drivers/dma/mmp_tdma.c: In function 'mmp_tdma_disable_chan':
drivers/dma/mmp_tdma.c:160: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast
drivers/dma/mmp_tdma.c:160: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
drivers/dma/mmp_tdma.c:164: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
drivers/dma/mmp_tdma.c: In function 'mmp_tdma_resume_chan':
drivers/dma/mmp_tdma.c:171: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast
drivers/dma/mmp_tdma.c:171: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
drivers/dma/mmp_tdma.c: In function 'mmp_tdma_pause_chan':
drivers/dma/mmp_tdma.c:178: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast
drivers/dma/mmp_tdma.c:178: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
drivers/dma/mmp_tdma.c: In function 'mmp_tdma_config_chan':
drivers/dma/mmp_tdma.c:263: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
drivers/dma/mmp_tdma.c: In function 'mmp_tdma_clear_chan_irq':
drivers/dma/mmp_tdma.c:269: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast
drivers/dma/mmp_tdma.c:274: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
[compile tested only]

 drivers/dma/mmp_tdma.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index 3ddacc1..61b562b 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -121,7 +121,7 @@  struct mmp_tdma_chan {
 	int				idx;
 	enum mmp_tdma_type		type;
 	int				irq;
-	unsigned long			reg_base;
+	void __iomem			*reg_base;
 
 	size_t				buf_len;
 	size_t				period_len;
@@ -526,7 +526,7 @@  static int mmp_tdma_chan_init(struct mmp_tdma_device *tdev,
 	tdmac->chan.device = &tdev->device;
 	tdmac->idx	   = idx;
 	tdmac->type	   = type;
-	tdmac->reg_base	   = (unsigned long)tdev->base + idx * 4;
+	tdmac->reg_base	   = tdev->base + idx * 4;
 	tdmac->status = DMA_COMPLETE;
 	tdev->tdmac[tdmac->idx] = tdmac;
 	tasklet_init(&tdmac->tasklet, dma_do_tasklet, (unsigned long)tdmac);