env: factor out the env_get_char_spec() function

env_get_char_spec() function is duplicated across multiple environment
files.
Remove the duplication by providing a default implementation.
Add "weak" declaration, so the default implementation can be overridden.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
This commit is contained in:
Igor Grinberg
2011-12-26 03:33:10 +00:00
committed by Wolfgang Denk
parent 33e1e01820
commit bf95df44ff
9 changed files with 9 additions and 39 deletions

View File

@@ -73,11 +73,6 @@ static ulong end_addr_new = CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1;
#endif /* CONFIG_ENV_ADDR_REDUND */
uchar env_get_char_spec(int index)
{
return *((uchar *)(gd->env_addr + index));
}
#ifdef CONFIG_ENV_ADDR_REDUND
int env_init(void)
{