From: Maxime Ripard Date: Tue, 23 Jan 2018 20:17:02 +0000 (+0100) Subject: env: Mark env_get_location as weak X-Git-Tag: v2018.03-rc1~81 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=40c08a68b9acec6ef5a029708834c5a229bde421;p=u-boot env: Mark env_get_location as weak Allow boards and architectures to override the default environment lookup code by overriding env_get_location. Reviewed-by: Andre Przywara Reviewed-by: Lukasz Majewski Reviewed-by: Simon Glass Signed-off-by: Maxime Ripard --- diff --git a/env/env.c b/env/env.c index d4f5e35b1e..9a89832c1a 100644 --- a/env/env.c +++ b/env/env.c @@ -88,6 +88,7 @@ static void env_set_inited(enum env_location location) * highest priority * * This will return the preferred environment for the given priority. + * This is overridable by boards if they need to. * * All implementations are free to use the operation, the priority and * any other data relevant to their choice, but must take into account @@ -98,7 +99,7 @@ static void env_set_inited(enum env_location location) * Returns: * an enum env_location value on success, a negative error code otherwise */ -static enum env_location env_get_location(enum env_operation op, int prio) +__weak enum env_location env_get_location(enum env_operation op, int prio) { switch (op) { case ENVOP_GET_CHAR: