From a7479fa89def9d8b1854d629dfdaa0ba17132617 Mon Sep 17 00:00:00 2001 From: Christopher Head Date: Thu, 13 Dec 2018 11:53:59 -0800 Subject: Constify struct flash_driver instances Instances of struct flash_driver are never written to at runtime. For a small amount of memory saving and also robustness (fewer things for stray pointer writes to hit), mark them const. Change-Id: Iadbbbc2fac0976d892699200000c5f02856729f3 Signed-off-by: Christopher Head Reviewed-on: http://openocd.zylin.com/4803 Reviewed-by: Antonio Borneo Tested-by: jenkins Reviewed-by: Matthias Welwarsky --- src/flash/nor/aducm360.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/flash/nor/aducm360.c') diff --git a/src/flash/nor/aducm360.c b/src/flash/nor/aducm360.c index 76637834..f468c89a 100644 --- a/src/flash/nor/aducm360.c +++ b/src/flash/nor/aducm360.c @@ -554,7 +554,7 @@ static int aducm360_check_flash_completion(struct target *target, unsigned int t } /* ----------------------------------------------------------------------- */ -struct flash_driver aducm360_flash = { +const struct flash_driver aducm360_flash = { .name = "aducm360", .flash_bank_command = aducm360_flash_bank_command, .erase = aducm360_erase, -- cgit v1.2.3-18-g5258