]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: move dma_unmap_sg to common header
authorGlauber Costa <gcosta@redhat.com>
Tue, 25 Mar 2008 21:36:24 +0000 (18:36 -0300)
committerIngo Molnar <mingo@elte.hu>
Sat, 19 Apr 2008 17:19:56 +0000 (19:19 +0200)
i386 gets an empty function.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/pci-base_32.c
include/asm-x86/dma-mapping.h
include/asm-x86/dma-mapping_32.h
include/asm-x86/dma-mapping_64.h

index 24741525901c5872127569fb72387b2ef9f57f3e..920530438d8c0858515411798a717578a8523d5e 100644 (file)
@@ -34,6 +34,7 @@ static const struct dma_mapping_ops pci32_dma_ops = {
        .map_single = pci32_map_single,
        .unmap_single = NULL,
        .map_sg = pci32_dma_map_sg,
+       .unmap_sg = NULL,
 };
 
 const struct dma_mapping_ops *dma_ops = &pci32_dma_ops;
index 09011546a48b64f57c35817b575401e2ece137df..6e7747a23e5bf1551a7325c4766c2ae0743d278f 100644 (file)
@@ -82,4 +82,13 @@ dma_map_sg(struct device *hwdev, struct scatterlist *sg,
        BUG_ON(!valid_dma_direction(direction));
        return dma_ops->map_sg(hwdev, sg, nents, direction);
 }
+
+static inline void
+dma_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents,
+            int direction)
+{
+       BUG_ON(!valid_dma_direction(direction));
+       if (dma_ops->unmap_sg)
+               dma_ops->unmap_sg(hwdev, sg, nents, direction);
+}
 #endif
index cdcdeff1e597164ed97c8f5c43e5b2342afcbacd..55445e3e2d6687dd9dfddc7913b507cf56fd76bc 100644 (file)
@@ -32,14 +32,6 @@ dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
        BUG_ON(!valid_dma_direction(direction));
 }
 
-
-static inline void
-dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
-            enum dma_data_direction direction)
-{
-       BUG_ON(!valid_dma_direction(direction));
-}
-
 static inline void
 dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
                        enum dma_data_direction direction)
index b27527ab770eda38fb27a9684f42952c9a3e1838..ce37efb847b36fa87bcc02fbfa600f9ef56bab98 100644 (file)
@@ -96,14 +96,6 @@ dma_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg,
        flush_write_buffers();
 }
 
-static inline void
-dma_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents,
-            int direction)
-{
-       BUG_ON(!valid_dma_direction(direction));
-       dma_ops->unmap_sg(hwdev, sg, nents, direction);
-}
-
 extern int dma_supported(struct device *hwdev, u64 mask);
 
 /* same for gart, swiotlb, and nommu */