aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_idle.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r--drivers/acpi/processor_idle.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 6dac6050bb5a..3f30af21574e 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -681,7 +681,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
681 return -ENODEV; 681 return -ENODEV;
682 } 682 }
683 683
684 cst = (union acpi_object *)buffer.pointer; 684 cst = buffer.pointer;
685 685
686 /* There must be at least 2 elements */ 686 /* There must be at least 2 elements */
687 if (!cst || (cst->type != ACPI_TYPE_PACKAGE) || cst->package.count < 2) { 687 if (!cst || (cst->type != ACPI_TYPE_PACKAGE) || cst->package.count < 2) {
@@ -710,14 +710,14 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
710 710
711 memset(&cx, 0, sizeof(cx)); 711 memset(&cx, 0, sizeof(cx));
712 712
713 element = (union acpi_object *)&(cst->package.elements[i]); 713 element = &(cst->package.elements[i]);
714 if (element->type != ACPI_TYPE_PACKAGE) 714 if (element->type != ACPI_TYPE_PACKAGE)
715 continue; 715 continue;
716 716
717 if (element->package.count != 4) 717 if (element->package.count != 4)
718 continue; 718 continue;
719 719
720 obj = (union acpi_object *)&(element->package.elements[0]); 720 obj = &(element->package.elements[0]);
721 721
722 if (obj->type != ACPI_TYPE_BUFFER) 722 if (obj->type != ACPI_TYPE_BUFFER)
723 continue; 723 continue;
@@ -729,7 +729,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
729 continue; 729 continue;
730 730
731 /* There should be an easy way to extract an integer... */ 731 /* There should be an easy way to extract an integer... */
732 obj = (union acpi_object *)&(element->package.elements[1]); 732 obj = &(element->package.elements[1]);
733 if (obj->type != ACPI_TYPE_INTEGER) 733 if (obj->type != ACPI_TYPE_INTEGER)
734 continue; 734 continue;
735 735
@@ -762,13 +762,13 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
762 } 762 }
763 } 763 }
764 764
765 obj = (union acpi_object *)&(element->package.elements[2]); 765 obj = &(element->package.elements[2]);
766 if (obj->type != ACPI_TYPE_INTEGER) 766 if (obj->type != ACPI_TYPE_INTEGER)
767 continue; 767 continue;
768 768
769 cx.latency = obj->integer.value; 769 cx.latency = obj->integer.value;
770 770
771 obj = (union acpi_object *)&(element->package.elements[3]); 771 obj = &(element->package.elements[3]);
772 if (obj->type != ACPI_TYPE_INTEGER) 772 if (obj->type != ACPI_TYPE_INTEGER)
773 continue; 773 continue;
774 774
@@ -1037,7 +1037,7 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
1037 1037
1038static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset) 1038static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
1039{ 1039{
1040 struct acpi_processor *pr = (struct acpi_processor *)seq->private; 1040 struct acpi_processor *pr = seq->private;
1041 unsigned int i; 1041 unsigned int i;
1042 1042
1043 1043