return nents;
 }
 
+/* Make sure we keep the same behaviour */
+static int pci32_map_error(dma_addr_t dma_addr)
+{
+       return 0;
+}
+
 static const struct dma_mapping_ops pci32_dma_ops = {
        .map_single = pci32_map_single,
        .unmap_single = NULL,
        .sync_single_range_for_device = NULL,
        .sync_sg_for_cpu = NULL,
        .sync_sg_for_device = NULL,
+       .mapping_error = pci32_map_error,
 };
 
 const struct dma_mapping_ops *dma_ops = &pci32_dma_ops;
 
 
 extern const struct dma_mapping_ops *dma_ops;
 
+static inline int dma_mapping_error(dma_addr_t dma_addr)
+{
+       if (dma_ops->mapping_error)
+               return dma_ops->mapping_error(dma_addr);
+
+       return (dma_addr == bad_dma_address);
+}
+
 #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
 #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
 
 
 #include <asm/io.h>
 #include <asm/bug.h>
 
-static inline int
-dma_mapping_error(dma_addr_t dma_addr)
-{
-       return 0;
-}
-
 extern int forbid_dac;
 
 static inline int
 
 
 extern int iommu_merge;
 
-static inline int dma_mapping_error(dma_addr_t dma_addr)
-{
-       if (dma_ops->mapping_error)
-               return dma_ops->mapping_error(dma_addr);
-
-       return (dma_addr == bad_dma_address);
-}
-
 /* same for gart, swiotlb, and nommu */
 static inline int dma_get_cache_alignment(void)
 {