Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6584504 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Andi Kleen
Browse files

[PATCH] x86-64: dma_ops as const



The dma_ops structure can be const since it never changes
after boot.

Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 19d17433
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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;
Loading