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/em357.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/flash/nor/em357.c') diff --git a/src/flash/nor/em357.c b/src/flash/nor/em357.c index b14e032..e6b2728 100644 --- a/src/flash/nor/em357.c +++ b/src/flash/nor/em357.c @@ -929,7 +929,7 @@ static const struct command_registration em357_command_handlers[] = { COMMAND_REGISTRATION_DONE }; -struct flash_driver em357_flash = { +const struct flash_driver em357_flash = { .name = "em357", .commands = em357_command_handlers, .flash_bank_command = em357_flash_bank_command, -- cgit v1.1