diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/processor_throttling.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index 605a2954ef17..1d02b7b5ade0 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c | |||
@@ -769,7 +769,7 @@ static int acpi_read_throttling_status(struct acpi_processor *pr, | |||
769 | u64 *value) | 769 | u64 *value) |
770 | { | 770 | { |
771 | u32 bit_width, bit_offset; | 771 | u32 bit_width, bit_offset; |
772 | u64 ptc_value; | 772 | u32 ptc_value; |
773 | u64 ptc_mask; | 773 | u64 ptc_mask; |
774 | struct acpi_processor_throttling *throttling; | 774 | struct acpi_processor_throttling *throttling; |
775 | int ret = -1; | 775 | int ret = -1; |
@@ -777,12 +777,11 @@ static int acpi_read_throttling_status(struct acpi_processor *pr, | |||
777 | throttling = &pr->throttling; | 777 | throttling = &pr->throttling; |
778 | switch (throttling->status_register.space_id) { | 778 | switch (throttling->status_register.space_id) { |
779 | case ACPI_ADR_SPACE_SYSTEM_IO: | 779 | case ACPI_ADR_SPACE_SYSTEM_IO: |
780 | ptc_value = 0; | ||
781 | bit_width = throttling->status_register.bit_width; | 780 | bit_width = throttling->status_register.bit_width; |
782 | bit_offset = throttling->status_register.bit_offset; | 781 | bit_offset = throttling->status_register.bit_offset; |
783 | 782 | ||
784 | acpi_os_read_port((acpi_io_address) throttling->status_register. | 783 | acpi_os_read_port((acpi_io_address) throttling->status_register. |
785 | address, (u32 *) &ptc_value, | 784 | address, &ptc_value, |
786 | (u32) (bit_width + bit_offset)); | 785 | (u32) (bit_width + bit_offset)); |
787 | ptc_mask = (1 << bit_width) - 1; | 786 | ptc_mask = (1 << bit_width) - 1; |
788 | *value = (u64) ((ptc_value >> bit_offset) & ptc_mask); | 787 | *value = (u64) ((ptc_value >> bit_offset) & ptc_mask); |