]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] x86-64: dma_ops as const
authorStephen Hemminger <shemminger@linux-foundation.org>
Wed, 2 May 2007 17:27:06 +0000 (19:27 +0200)
committerAndi Kleen <andi@basil.nowhere.org>
Wed, 2 May 2007 17:27:06 +0000 (19:27 +0200)
The dma_ops structure can be const since it never changes
after boot.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
arch/x86_64/kernel/pci-calgary.c
arch/x86_64/kernel/pci-gart.c
arch/x86_64/kernel/pci-nommu.c
arch/x86_64/kernel/pci-swiotlb.c
arch/x86_64/mm/init.c
include/asm-x86_64/dma-mapping.h

index 04480c3b68f5d15177192e8336fcdecda4f52b68..5bd20b542c1efc47a0d93da505135bb08a35f346 100644 (file)
@@ -507,7 +507,7 @@ error:
        return ret;
 }
 
-static struct dma_mapping_ops calgary_dma_ops = {
+static const struct dma_mapping_ops calgary_dma_ops = {
        .alloc_coherent = calgary_alloc_coherent,
        .map_single = calgary_map_single,
        .unmap_single = calgary_unmap_single,
index 0bae862e9a55ec773d42edfe7670df39dfd3f7f5..0a762e10f2be890b20c4350c11ebe53927df4b9b 100644 (file)
@@ -556,7 +556,7 @@ static __init int init_k8_gatt(struct agp_kern_info *info)
 
 extern int agp_amd64_init(void);
 
-static struct dma_mapping_ops gart_dma_ops = {
+static const struct dma_mapping_ops gart_dma_ops = {
        .mapping_error = NULL,
        .map_single = gart_map_single,
        .map_simple = gart_map_simple,
index df09ab05a1bd1efbb931d893a4f174f6f00ac651..6dade0c867cc68bd2319eadcf42e4820d42474f2 100644 (file)
@@ -79,7 +79,7 @@ void nommu_unmap_sg(struct device *dev, struct scatterlist *sg,
 {
 }
 
-struct dma_mapping_ops nommu_dma_ops = {
+const struct dma_mapping_ops nommu_dma_ops = {
        .map_single = nommu_map_single,
        .unmap_single = nommu_unmap_single,
        .map_sg = nommu_map_sg,
index eb18be5a656979b6415b3f7102c6f93b8fa07a2c..4b4569abc60c8d3f3b993d2f1e0f9ee320ea0d82 100644 (file)
@@ -12,7 +12,7 @@
 int swiotlb __read_mostly;
 EXPORT_SYMBOL(swiotlb);
 
-struct dma_mapping_ops swiotlb_dma_ops = {
+const struct dma_mapping_ops swiotlb_dma_ops = {
        .mapping_error = swiotlb_dma_mapping_error,
        .alloc_coherent = swiotlb_alloc_coherent,
        .free_coherent = swiotlb_free_coherent,
index ec31534eb104875649847948c32f816c6951d5a8..5ca61731f55068cef9bb1136114112090e7e7a90 100644 (file)
@@ -46,7 +46,7 @@
 #define Dprintk(x...)
 #endif
 
-struct dma_mapping_ops* dma_ops;
+const struct dma_mapping_ops* dma_ops;
 EXPORT_SYMBOL(dma_ops);
 
 static unsigned long dma_reserve __initdata;
index d2af227f06d025c7cccc56cfffc9f4f1501583e9..6897e2a436e5cc92245a456ececbe2824bf50bc4 100644 (file)
@@ -52,7 +52,7 @@ struct dma_mapping_ops {
 };
 
 extern dma_addr_t bad_dma_address;
-extern struct dma_mapping_ops* dma_ops;
+extern const struct dma_mapping_ops* dma_ops;
 extern int iommu_merge;
 
 static inline int dma_mapping_error(dma_addr_t dma_addr)