From 2328ed663b3a34123df2c794f95505d332dc5284 Mon Sep 17 00:00:00 2001 From: Bhumika Goyal Date: Sat, 15 Oct 2016 11:43:48 +0530 Subject: [PATCH] Staging: android: ion: constify dma_buf_ops structure The dma_buf_ops structure is stored in the ops field of a dma_buf_export_info structure and also used as a condition inside the if() statement. The if condition does not modify its value and the ops field is of type const struct *dma_buf_ops, so dma_buf_ops structures having this property can be declared as const. File size before: text data bss dec hex filename 14471 819 224 15514 3c9a drivers/staging/android/ion/ion.o File size after: text data bss dec hex filename 14599 707 224 15530 3caa drivers/staging/android/ion/ion.o Signed-off-by: Bhumika Goyal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- drivers/staging/android/ion/ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 396ded52ab70..45eceea449e4 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -1013,7 +1013,7 @@ static int ion_dma_buf_end_cpu_access(struct dma_buf *dmabuf, return 0; } -static struct dma_buf_ops dma_buf_ops = { +static const struct dma_buf_ops dma_buf_ops = { .map_dma_buf = ion_map_dma_buf, .unmap_dma_buf = ion_unmap_dma_buf, .mmap = ion_mmap, -- 2.11.4.GIT