dmaengine: sun6i: fix build failure on x86, xilinx targets
authorVinod Koul <vinod.koul@intel.com>
Mon, 28 Jul 2014 06:27:25 +0000 (11:57 +0530)
committerVinod Koul <vinod.koul@intel.com>
Mon, 28 Jul 2014 07:19:33 +0000 (12:49 +0530)
Since the driver defined COMPILE_TEST, it gets compiled for different arch's
The driver uses __virt_to_phys() insteadof virt_to_phys, so replace it

drivers/dma/sun6i-dma.c: In function ‘sun6i_dma_dump_chan_regs’:
drivers/dma/sun6i-dma.c:203: error: implicit declaration of function '__virt_to_phys'

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/sun6i-dma.c

index ce8d5d1b0ff4efeb539e721f347d6b88603a0384..e9f99bbc985ea766e7488ffd9edc5f1569efb92a 100644 (file)
@@ -200,7 +200,7 @@ static inline void sun6i_dma_dump_com_regs(struct sun6i_dma_dev *sdev)
 static inline void sun6i_dma_dump_chan_regs(struct sun6i_dma_dev *sdev,
                                            struct sun6i_pchan *pchan)
 {
-       phys_addr_t reg = __virt_to_phys((unsigned long)pchan->base);
+       phys_addr_t reg = virt_to_phys(pchan->base);
 
        dev_dbg(sdev->slave.dev, "Chan %d reg: %pa\n"
                "\t___en(%04x): \t0x%08x\n"
@@ -330,7 +330,7 @@ static inline int sun6i_dma_cfg_lli(struct sun6i_dma_lli *lli,
 static inline void sun6i_dma_dump_lli(struct sun6i_vchan *vchan,
                                      struct sun6i_dma_lli *lli)
 {
-       phys_addr_t p_lli = __virt_to_phys((unsigned long)lli);
+       phys_addr_t p_lli = virt_to_phys(lli);
 
        dev_dbg(chan2dev(&vchan->vc.chan),
                "\n\tdesc:   p - %pa v - 0x%p\n"