From 39ff7d5f4cc547a2034a8bfc2a5b5f4b62fd5c20 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Thu, 3 Dec 2009 06:24:30 +0100 Subject: POST: Remove duplicated post_hotkey_pressed() functions This patch introduces a weak default function for post_hotkey_pressed(), returning 0, for boards without hotkey support. The long-running tests won't be started on those boards. This default function was implemented in many board directories. By implementing this weak default we can remove all those duplicate versions. Boards with hotkey support, can override this weak default function by defining one in their board specific code. Signed-off-by: Stefan Roese --- post/post.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'post') diff --git a/post/post.c b/post/post.c index b74e76231..b29eb87fc 100644 --- a/post/post.c +++ b/post/post.c @@ -58,6 +58,22 @@ int post_init_f (void) return res; } +/* + * Supply a default implementation for post_hotkeys_pressed() for boards + * without hotkey support. We always return 0 here, so that the + * long-running tests won't be started. + * + * Boards with hotkey support can override this weak default function + * by defining one in their board specific code. + */ +int __post_hotkeys_pressed(void) +{ + return 0; /* No hotkeys supported */ +} +int post_hotkeys_pressed(void) + __attribute__((weak, alias("__post_hotkeys_pressed"))); + + void post_bootmode_init (void) { int bootmode = post_bootmode_get (0); -- cgit v1.2.3