summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-08-14 16:12:31 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-08-16 08:40:37 +0200
commitb986f4f1ee4881c4c1d81738cf9f0366381f7066 (patch)
treeec9333b46094e958ec5bc1bfbfd43c19e59de959 /common
parent8326bff00fd2a3aaa5f45a0c3de35a76ab767c83 (diff)
downloadbarebox-b986f4f1ee4881c4c1d81738cf9f0366381f7066.tar.gz
remove remaining references of CONFIG_BOARDINFO
With this all code uses barebox_get_model() and no longer a compile time generated string. Also this renames barebox_boardinfo() to barebox_get_model() since we are going to add the corresponding _set_ function and 'model' corresponds to the devicetree notion. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/Kconfig2
-rw-r--r--common/misc.c20
-rw-r--r--common/version.c2
3 files changed, 12 insertions, 12 deletions
diff --git a/common/Kconfig b/common/Kconfig
index 6322d9d..dd70578 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -353,7 +353,7 @@ config HUSH_FANCY_PROMPT
prompt "allow fancy hush prompts"
help
Allow to set PS1 from the command line. PS1 can have several escaped commands
- like \h for CONFIG_BOARDINFO or \w for the current working directory.
+ like \h for the 'model' string or \w for the current working directory.
config HUSH_GETOPT
bool
diff --git a/common/misc.c b/common/misc.c
index 8066494..14c3304 100644
--- a/common/misc.c
+++ b/common/misc.c
@@ -126,19 +126,19 @@ EXPORT_SYMBOL(perror);
void (*do_execute)(void *func, int argc, char *argv[]);
EXPORT_SYMBOL(do_execute);
-static const char *boardinfo;
+static const char *model;
-const char *barebox_boardinfo(void)
+const char *barebox_get_model(void)
{
- if (boardinfo)
- return boardinfo;
+ if (model)
+ return model;
- boardinfo = of_get_model();
- if (boardinfo)
- boardinfo = xstrdup(boardinfo);
+ model = of_get_model();
+ if (model)
+ model = xstrdup(model);
else
- boardinfo = CONFIG_BOARDINFO;
+ model = CONFIG_BOARDINFO;
- return boardinfo;
+ return model;
}
-EXPORT_SYMBOL(barebox_boardinfo);
+EXPORT_SYMBOL(barebox_get_model);
diff --git a/common/version.c b/common/version.c
index e21dbbe..79b2a54 100644
--- a/common/version.c
+++ b/common/version.c
@@ -9,5 +9,5 @@ EXPORT_SYMBOL(version_string);
void barebox_banner (void)
{
pr_info("\n\n%s\n\n", version_string);
- pr_info("Board: %s\n", barebox_boardinfo());
+ pr_info("Board: %s\n", barebox_get_model());
}