]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc: expect all devices calling dma ops to have archdata set
authorKumar Gala <galak@kernel.crashing.org>
Thu, 19 Mar 2009 03:40:52 +0000 (03:40 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 24 Mar 2009 02:47:31 +0000 (13:47 +1100)
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>
arch/powerpc/include/asm/dma-mapping.h

index 86cef7ddc8d5f251b07c6c838bf7dcba9d8d579d..c69f2b5f0cc40035877ccea1f363c3de6711fc61 100644 (file)
@@ -109,18 +109,8 @@ static inline struct dma_mapping_ops *get_dma_ops(struct device *dev)
         * only ISA DMA device we support is the floppy and we have a hack
         * in the floppy driver directly to get a device for us.
         */
-
-       if (unlikely(dev == NULL) || dev->archdata.dma_ops == NULL) {
-#ifdef CONFIG_PPC64
+       if (unlikely(dev == NULL))
                return NULL;
-#else
-               /* Use default on 32-bit if dma_ops is not set up */
-               /* TODO: Long term, we should fix drivers so that dev and
-                * archdata dma_ops are set up for all buses.
-                */
-               return &dma_direct_ops;
-#endif
-       }
 
        return dev->archdata.dma_ops;
 }