aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/lparcfg.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-07-12 01:35:54 -0400
committerPaul Mackerras <paulus@samba.org>2006-07-31 01:55:04 -0400
commita7f67bdf2c9f24509b8e81e0f35573b611987c80 (patch)
tree201662dd6504418ef3c84cfe1f280153a4d8cb29 /arch/powerpc/kernel/lparcfg.c
parent4288b92b9644fdb4c6168273873fe08f32090d7a (diff)
[POWERPC] Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. powerpc core changes. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/lparcfg.c')
-rw-r--r--arch/powerpc/kernel/lparcfg.c11
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 }