aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Boulby <daniel.boulby@arm.com>2018-06-07 14:15:15 +0100
committerDaniel Boulby <daniel.boulby@arm.com>2018-07-30 13:10:44 +0100
commit455bca21fed1c2152c1e7a916d1a7c1e04d9d1c0 (patch)
treec4c6c8ba3ae10913c8acf08a125b1aa2eed1db51
parent60e062fb0e33f7d9825267cbfb397d7c7aca1169 (diff)
downloadtrusted-firmware-a-455bca21fed1c2152c1e7a916d1a7c1e04d9d1c0.tar.gz
Set console function pointers to const
Set the function pointers in the console struct and the functions they point to to const since they only need to be defined when the console is being initialised and should not be changed after Change-Id: I0574307111e3ab2f13d1a4a74c3fa75532dfa4be Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
-rw-r--r--include/drivers/console.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/drivers/console.h b/include/drivers/console.h
index 6e7ebbf9ca..f9ed2e569c 100644
--- a/include/drivers/console.h
+++ b/include/drivers/console.h
@@ -39,9 +39,9 @@ typedef struct console {
* fields of the struct to 64 bits in AArch64 and 32 bits in AArch32
*/
u_register_t flags;
- int (*putc)(int character, struct console *console);
- int (*getc)(struct console *console);
- int (*flush)(struct console *console);
+ int (*const putc)(int character, struct console *console);
+ int (*const getc)(struct console *console);
+ int (*const flush)(struct console *console);
/* Additional private driver data may follow here. */
} console_t;
#include <console_assertions.h> /* offset macro assertions for console_t */