aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/rtas-proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/rtas-proc.c')
-rw-r--r--arch/powerpc/kernel/rtas-proc.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c
index 9c9ad1fa9cce..2fe82abf1c52 100644
--- a/arch/powerpc/kernel/rtas-proc.c
+++ b/arch/powerpc/kernel/rtas-proc.c
@@ -246,12 +246,12 @@ struct file_operations ppc_rtas_rmo_buf_ops = {
246 246
247static int ppc_rtas_find_all_sensors(void); 247static int ppc_rtas_find_all_sensors(void);
248static void ppc_rtas_process_sensor(struct seq_file *m, 248static void ppc_rtas_process_sensor(struct seq_file *m,
249 struct individual_sensor *s, int state, int error, char *loc); 249 struct individual_sensor *s, int state, int error, const char *loc);
250static char *ppc_rtas_process_error(int error); 250static char *ppc_rtas_process_error(int error);
251static void get_location_code(struct seq_file *m, 251static void get_location_code(struct seq_file *m,
252 struct individual_sensor *s, char *loc); 252 struct individual_sensor *s, const char *loc);
253static void check_location_string(struct seq_file *m, char *c); 253static void check_location_string(struct seq_file *m, const char *c);
254static void check_location(struct seq_file *m, char *c); 254static void check_location(struct seq_file *m, const char *c);
255 255
256static int __init proc_rtas_init(void) 256static int __init proc_rtas_init(void)
257{ 257{
@@ -446,11 +446,11 @@ static int ppc_rtas_sensors_show(struct seq_file *m, void *v)
446 for (i=0; i<sensors.quant; i++) { 446 for (i=0; i<sensors.quant; i++) {
447 struct individual_sensor *p = &sensors.sensor[i]; 447 struct individual_sensor *p = &sensors.sensor[i];
448 char rstr[64]; 448 char rstr[64];
449 char *loc; 449 const char *loc;
450 int llen, offs; 450 int llen, offs;
451 451
452 sprintf (rstr, SENSOR_PREFIX"%04d", p->token); 452 sprintf (rstr, SENSOR_PREFIX"%04d", p->token);
453 loc = (char *) get_property(rtas_node, rstr, &llen); 453 loc = get_property(rtas_node, rstr, &llen);
454 454
455 /* A sensor may have multiple instances */ 455 /* A sensor may have multiple instances */
456 for (j = 0, offs = 0; j <= p->quant; j++) { 456 for (j = 0, offs = 0; j <= p->quant; j++) {
@@ -474,10 +474,10 @@ static int ppc_rtas_sensors_show(struct seq_file *m, void *v)
474 474
475static int ppc_rtas_find_all_sensors(void) 475static int ppc_rtas_find_all_sensors(void)
476{ 476{
477 unsigned int *utmp; 477 const unsigned int *utmp;
478 int len, i; 478 int len, i;
479 479
480 utmp = (unsigned int *) get_property(rtas_node, "rtas-sensors", &len); 480 utmp = get_property(rtas_node, "rtas-sensors", &len);
481 if (utmp == NULL) { 481 if (utmp == NULL) {
482 printk (KERN_ERR "error: could not get rtas-sensors\n"); 482 printk (KERN_ERR "error: could not get rtas-sensors\n");
483 return 1; 483 return 1;
@@ -530,7 +530,7 @@ static char *ppc_rtas_process_error(int error)
530 */ 530 */
531 531
532static void ppc_rtas_process_sensor(struct seq_file *m, 532static void ppc_rtas_process_sensor(struct seq_file *m,
533 struct individual_sensor *s, int state, int error, char *loc) 533 struct individual_sensor *s, int state, int error, const char *loc)
534{ 534{
535 /* Defined return vales */ 535 /* Defined return vales */
536 const char * key_switch[] = { "Off\t", "Normal\t", "Secure\t", 536 const char * key_switch[] = { "Off\t", "Normal\t", "Secure\t",
@@ -682,7 +682,7 @@ static void ppc_rtas_process_sensor(struct seq_file *m,
682 682
683/* ****************************************************************** */ 683/* ****************************************************************** */
684 684
685static void check_location(struct seq_file *m, char *c) 685static void check_location(struct seq_file *m, const char *c)
686{ 686{
687 switch (c[0]) { 687 switch (c[0]) {
688 case LOC_PLANAR: 688 case LOC_PLANAR:
@@ -719,7 +719,7 @@ static void check_location(struct seq_file *m, char *c)
719 * ${LETTER}${NUMBER}[[-/]${LETTER}${NUMBER} [ ... ] ] 719 * ${LETTER}${NUMBER}[[-/]${LETTER}${NUMBER} [ ... ] ]
720 * the '.' may be an abbrevation 720 * the '.' may be an abbrevation
721 */ 721 */
722static void check_location_string(struct seq_file *m, char *c) 722static void check_location_string(struct seq_file *m, const char *c)
723{ 723{
724 while (*c) { 724 while (*c) {
725 if (isalpha(*c) || *c == '.') 725 if (isalpha(*c) || *c == '.')
@@ -733,7 +733,8 @@ static void check_location_string(struct seq_file *m, char *c)
733 733
734/* ****************************************************************** */ 734/* ****************************************************************** */
735 735
736static void get_location_code(struct seq_file *m, struct individual_sensor *s, char *loc) 736static void get_location_code(struct seq_file *m, struct individual_sensor *s,
737 const char *loc)
737{ 738{
738 if (!loc || !*loc) { 739 if (!loc || !*loc) {
739 seq_printf(m, "---");/* does not have a location */ 740 seq_printf(m, "---");/* does not have a location */