aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/dma-mapping.h
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2009-03-18 23:40:52 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-03-23 22:47:31 -0400
commit4ae0ff606e848fa4957ebf8f97e5db5fdeec27be (patch)
tree011447a606d584d867b6ba8623b886a8bd6f6a69 /arch/powerpc/include/asm/dma-mapping.h
parentd746286c1fcb186ce16295c30d48db852ede6772 (diff)
powerpc: expect all devices calling dma ops to have archdata set
Now that we set archdata for of_platform and platform devices via platform_notify() we no longer need to special case having a NULL device pointer or NULL archdata. It should be a driver error if this condition shows up and the driver should be fixed. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/dma-mapping.h')
-rw-r--r--arch/powerpc/include/asm/dma-mapping.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h
index 86cef7ddc8d5..c69f2b5f0cc4 100644
--- a/arch/powerpc/include/asm/dma-mapping.h
+++ b/arch/powerpc/include/asm/dma-mapping.h
@@ -109,18 +109,8 @@ static inline struct dma_mapping_ops *get_dma_ops(struct device *dev)
109 * only ISA DMA device we support is the floppy and we have a hack 109 * only ISA DMA device we support is the floppy and we have a hack
110 * in the floppy driver directly to get a device for us. 110 * in the floppy driver directly to get a device for us.
111 */ 111 */
112 112 if (unlikely(dev == NULL))
113 if (unlikely(dev == NULL) || dev->archdata.dma_ops == NULL) {
114#ifdef CONFIG_PPC64
115 return NULL; 113 return NULL;
116#else
117 /* Use default on 32-bit if dma_ops is not set up */
118 /* TODO: Long term, we should fix drivers so that dev and
119 * archdata dma_ops are set up for all buses.
120 */
121 return &dma_direct_ops;
122#endif
123 }
124 114
125 return dev->archdata.dma_ops; 115 return dev->archdata.dma_ops;
126} 116}