diff options
author | Tony Lindgren <tony@atomide.com> | 2011-11-07 21:27:23 +0100 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-11-07 21:27:23 +0100 |
commit | d30cc16c8e48368e0518f4975a78711e53e14a0f (patch) | |
tree | 26b57f7ab5a963cc3d6c57dff6951bd930875583 /drivers/of/fdt.c | |
parent | ARM: OMAP2: Fix H4 matrix keyboard warning (diff) | |
parent | ARM: OMAP: Fix export.h or module.h includes (diff) | |
download | linux-d30cc16c8e48368e0518f4975a78711e53e14a0f.tar.xz linux-d30cc16c8e48368e0518f4975a78711e53e14a0f.zip |
Merge branch 'fixes-modulesplit' into fixes
Diffstat (limited to 'drivers/of/fdt.c')
-rw-r--r-- | drivers/of/fdt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index aeec35bc3789..fd85fa298e0f 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -681,9 +681,14 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, if (p != NULL && l > 0) strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); + /* + * CONFIG_CMDLINE is meant to be a default in case nothing else + * managed to set the command line, unless CONFIG_CMDLINE_FORCE + * is set in which case we override whatever was found earlier. + */ #ifdef CONFIG_CMDLINE #ifndef CONFIG_CMDLINE_FORCE - if (p == NULL || l == 0 || (l == 1 && (*p) == 0)) + if (!((char *)data)[0]) #endif strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE); #endif /* CONFIG_CMDLINE */ |