|
@@ -228,17 +228,12 @@ static struct property memory_limit_prop = {
|
|
|
|
|
|
static void __init export_crashk_values(struct device_node *node)
|
|
|
{
|
|
|
- struct property *prop;
|
|
|
-
|
|
|
/* There might be existing crash kernel properties, but we can't
|
|
|
* be sure what's in them, so remove them. */
|
|
|
- prop = of_find_property(node, "linux,crashkernel-base", NULL);
|
|
|
- if (prop)
|
|
|
- of_remove_property(node, prop);
|
|
|
-
|
|
|
- prop = of_find_property(node, "linux,crashkernel-size", NULL);
|
|
|
- if (prop)
|
|
|
- of_remove_property(node, prop);
|
|
|
+ of_remove_property(node, of_find_property(node,
|
|
|
+ "linux,crashkernel-base", NULL));
|
|
|
+ of_remove_property(node, of_find_property(node,
|
|
|
+ "linux,crashkernel-size", NULL));
|
|
|
|
|
|
if (crashk_res.start != 0) {
|
|
|
crashk_base = cpu_to_be_ulong(crashk_res.start),
|
|
@@ -258,16 +253,13 @@ static void __init export_crashk_values(struct device_node *node)
|
|
|
static int __init kexec_setup(void)
|
|
|
{
|
|
|
struct device_node *node;
|
|
|
- struct property *prop;
|
|
|
|
|
|
node = of_find_node_by_path("/chosen");
|
|
|
if (!node)
|
|
|
return -ENOENT;
|
|
|
|
|
|
/* remove any stale properties so ours can be found */
|
|
|
- prop = of_find_property(node, kernel_end_prop.name, NULL);
|
|
|
- if (prop)
|
|
|
- of_remove_property(node, prop);
|
|
|
+ of_remove_property(node, of_find_property(node, kernel_end_prop.name, NULL));
|
|
|
|
|
|
/* information needed by userspace when using default_machine_kexec */
|
|
|
kernel_end = cpu_to_be_ulong(__pa(_end));
|