]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
powerpc: remove support for NULL dev in __phys_to_dma / __dma_to_phys
authorChristoph Hellwig <hch@lst.de>
Tue, 12 Nov 2019 16:08:49 +0000 (17:08 +0100)
committerChristoph Hellwig <hch@lst.de>
Wed, 20 Nov 2019 19:31:40 +0000 (20:31 +0100)
Support for calling the DMA API functions without a valid device pointer
was removed a while ago, so remove the stale support for that from the
powerpc __phys_to_dma / __dma_to_phys helpers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
arch/powerpc/include/asm/dma-direct.h

index e29e8a236b8dff399fac84e9293fd0ac6169b4de..abc154d784b078a3fb4f1151686439f274689622 100644 (file)
@@ -4,15 +4,11 @@
 
 static inline dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t paddr)
 {
-       if (!dev)
-               return paddr + PCI_DRAM_OFFSET;
        return paddr + dev->archdata.dma_offset;
 }
 
 static inline phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t daddr)
 {
-       if (!dev)
-               return daddr - PCI_DRAM_OFFSET;
        return daddr - dev->archdata.dma_offset;
 }
 #endif /* ASM_POWERPC_DMA_DIRECT_H */