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/bluenrg-x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/flash/nor/bluenrg-x.c') diff --git a/src/flash/nor/bluenrg-x.c b/src/flash/nor/bluenrg-x.c index f1b20620..f6a24927 100644 --- a/src/flash/nor/bluenrg-x.c +++ b/src/flash/nor/bluenrg-x.c @@ -539,7 +539,7 @@ static int bluenrgx_get_info(struct flash_bank *bank, char *buf, int buf_size) return ERROR_OK; } -struct flash_driver bluenrgx_flash = { +const struct flash_driver bluenrgx_flash = { .name = "bluenrg-x", .flash_bank_command = bluenrgx_flash_bank_command, .erase = bluenrgx_erase, -- cgit v1.2.3-18-g5258