diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-25 01:08:17 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-25 01:08:17 +0200 |
commit | 03eb14199e8a2ff2bc170b283305990151b0d619 (patch) | |
tree | c16c123a850e8033b2daa71ad9ae241906542dd8 /drivers/of | |
parent | Merge branch 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/let... (diff) | |
parent | dt: add documentation of ARM dt boot interface (diff) | |
download | linux-03eb14199e8a2ff2bc170b283305990151b0d619.tar.xz linux-03eb14199e8a2ff2bc170b283305990151b0d619.zip |
Merge branch 'devicetree/arm-next' of git://git.secretlab.ca/git/linux-2.6 into devel-stable
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/fdt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 8b63a691a9ed..65200af29c52 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -670,7 +670,7 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, pr_debug("search \"chosen\", depth: %d, uname: %s\n", depth, uname); - if (depth != 1 || + if (depth != 1 || !data || (strcmp(uname, "chosen") != 0 && strcmp(uname, "chosen@0") != 0)) return 0; @@ -679,16 +679,16 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, /* Retrieve command line */ p = of_get_flat_dt_prop(node, "bootargs", &l); if (p != NULL && l > 0) - strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE)); + strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); #ifdef CONFIG_CMDLINE #ifndef CONFIG_CMDLINE_FORCE if (p == NULL || l == 0 || (l == 1 && (*p) == 0)) #endif - strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE); + strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE); #endif /* CONFIG_CMDLINE */ - pr_debug("Command line is: %s\n", cmd_line); + pr_debug("Command line is: %s\n", (char*)data); /* break now */ return 1; |