From a0f204a4f79d09a102315a67e1ba27de9fea6c8a Mon Sep 17 00:00:00 2001 From: Mihaela Muraru Date: Mon, 17 Oct 2016 17:20:18 +0300 Subject: [PATCH] Staging: android: ion: Make a read-only structure This patch add const qualifier at the declaration of the structure. The structure become a read-only data, this increase the security. Found with Coccinelle: @r disable optional_qualifier@ identifier s,i; @@ * static struct s i ={...}; Signed-off-by: Mihaela Muraru Signed-off-by: Greg Kroah-Hartman --- drivers/staging/android/ion/ion_dummy_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_dummy_driver.c b/drivers/staging/android/ion/ion_dummy_driver.c index b23f2c76c753..cf5c010d32bc 100644 --- a/drivers/staging/android/ion/ion_dummy_driver.c +++ b/drivers/staging/android/ion/ion_dummy_driver.c @@ -58,7 +58,7 @@ static struct ion_platform_heap dummy_heaps[] = { }, }; -static struct ion_platform_data dummy_ion_pdata = { +static const struct ion_platform_data dummy_ion_pdata = { .nr = ARRAY_SIZE(dummy_heaps), .heaps = dummy_heaps, }; -- 2.20.1