diff options
Diffstat (limited to 'arch/powerpc/kernel/lparcfg.c')
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 2d94b372d49b..3ce3a2d56fa8 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -309,12 +309,11 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) | |||
309 | int partition_potential_processors; | 309 | int partition_potential_processors; |
310 | int partition_active_processors; | 310 | int partition_active_processors; |
311 | struct device_node *rtas_node; | 311 | struct device_node *rtas_node; |
312 | int *lrdrp = NULL; | 312 | const int *lrdrp = NULL; |
313 | 313 | ||
314 | rtas_node = find_path_device("/rtas"); | 314 | rtas_node = find_path_device("/rtas"); |
315 | if (rtas_node) | 315 | if (rtas_node) |
316 | lrdrp = (int *)get_property(rtas_node, "ibm,lrdr-capacity", | 316 | lrdrp = get_property(rtas_node, "ibm,lrdr-capacity", NULL); |
317 | NULL); | ||
318 | 317 | ||
319 | if (lrdrp == NULL) { | 318 | if (lrdrp == NULL) { |
320 | partition_potential_processors = vdso_data->processorCount; | 319 | partition_potential_processors = vdso_data->processorCount; |
@@ -519,7 +518,8 @@ static int lparcfg_data(struct seq_file *m, void *v) | |||
519 | const char *model = ""; | 518 | const char *model = ""; |
520 | const char *system_id = ""; | 519 | const char *system_id = ""; |
521 | const char *tmp; | 520 | const char *tmp; |
522 | unsigned int *lp_index_ptr, lp_index = 0; | 521 | const unsigned int *lp_index_ptr; |
522 | unsigned int lp_index = 0; | ||
523 | 523 | ||
524 | seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS); | 524 | seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS); |
525 | 525 | ||
@@ -539,8 +539,7 @@ static int lparcfg_data(struct seq_file *m, void *v) | |||
539 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | 539 | if (firmware_has_feature(FW_FEATURE_ISERIES)) |
540 | system_id += 4; | 540 | system_id += 4; |
541 | } | 541 | } |
542 | lp_index_ptr = (unsigned int *) | 542 | lp_index_ptr = get_property(rootdn, "ibm,partition-no", NULL); |
543 | get_property(rootdn, "ibm,partition-no", NULL); | ||
544 | if (lp_index_ptr) | 543 | if (lp_index_ptr) |
545 | lp_index = *lp_index_ptr; | 544 | lp_index = *lp_index_ptr; |
546 | } | 545 | } |