aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2010-01-27 21:53:19 -0500
committerLen Brown <len.brown@intel.com>2010-01-28 01:47:33 -0500
commit439913fffd39374c3737186b22d2d56c3a0ae526 (patch)
treef6d5c809c1b77950a2cf7174fdee8667d527c87b /drivers/acpi
parentaea9c04bcc257caad9841c283b90ec1b28267fae (diff)
ACPI: replace acpi_integer by u64
acpi_integer is now obsolete and removed from the ACPICA code base, replaced by u64. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/battery.c4
-rw-r--r--drivers/acpi/ec.c4
-rw-r--r--drivers/acpi/glue.c4
-rw-r--r--drivers/acpi/osl.c4
-rw-r--r--drivers/acpi/power_meter.c30
-rw-r--r--drivers/acpi/processor_idle.c2
-rw-r--r--drivers/acpi/processor_throttling.c24
-rw-r--r--drivers/acpi/utils.c16
-rw-r--r--drivers/acpi/video.c2
9 files changed, 45 insertions, 45 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index cada73ffdfa7..58d2c91ba62b 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -324,8 +324,8 @@ static int extract_package(struct acpi_battery *battery,
324 strncpy(ptr, element->string.pointer, 32); 324 strncpy(ptr, element->string.pointer, 32);
325 else if (element->type == ACPI_TYPE_INTEGER) { 325 else if (element->type == ACPI_TYPE_INTEGER) {
326 strncpy(ptr, (u8 *)&element->integer.value, 326 strncpy(ptr, (u8 *)&element->integer.value,
327 sizeof(acpi_integer)); 327 sizeof(u64));
328 ptr[sizeof(acpi_integer)] = 0; 328 ptr[sizeof(u64)] = 0;
329 } else 329 } else
330 *ptr = 0; /* don't have value */ 330 *ptr = 0; /* don't have value */
331 } else { 331 } else {
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index d6471bb6852f..748ced85dec5 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -589,7 +589,7 @@ static u32 acpi_ec_gpe_handler(void *data)
589 589
590static acpi_status 590static acpi_status
591acpi_ec_space_handler(u32 function, acpi_physical_address address, 591acpi_ec_space_handler(u32 function, acpi_physical_address address,
592 u32 bits, acpi_integer *value, 592 u32 bits, u64 *value,
593 void *handler_context, void *region_context) 593 void *handler_context, void *region_context)
594{ 594{
595 struct acpi_ec *ec = handler_context; 595 struct acpi_ec *ec = handler_context;
@@ -620,7 +620,7 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
620 ++address; 620 ++address;
621 if (function == ACPI_READ) { 621 if (function == ACPI_READ) {
622 result = acpi_ec_read(ec, address, &temp); 622 result = acpi_ec_read(ec, address, &temp);
623 (*value) |= ((acpi_integer)temp) << i; 623 (*value) |= ((u64)temp) << i;
624 } else { 624 } else {
625 temp = 0xff & ((*value) >> i); 625 temp = 0xff & ((*value) >> i);
626 result = acpi_ec_write(ec, address, temp); 626 result = acpi_ec_write(ec, address, temp);
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 4c8fcff662cf..6d5b64b7d526 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -87,7 +87,7 @@ static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle)
87/* Get device's handler per its address under its parent */ 87/* Get device's handler per its address under its parent */
88struct acpi_find_child { 88struct acpi_find_child {
89 acpi_handle handle; 89 acpi_handle handle;
90 acpi_integer address; 90 u64 address;
91}; 91};
92 92
93static acpi_status 93static acpi_status
@@ -106,7 +106,7 @@ do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv)
106 return AE_OK; 106 return AE_OK;
107} 107}
108 108
109acpi_handle acpi_get_child(acpi_handle parent, acpi_integer address) 109acpi_handle acpi_get_child(acpi_handle parent, u64 address)
110{ 110{
111 struct acpi_find_child find = { NULL, address }; 111 struct acpi_find_child find = { NULL, address };
112 112
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 02e8464e480f..8e6d8665f0ae 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -436,7 +436,7 @@ acpi_status acpi_os_remove_interrupt_handler(u32 irq, acpi_osd_handler handler)
436 * Running in interpreter thread context, safe to sleep 436 * Running in interpreter thread context, safe to sleep
437 */ 437 */
438 438
439void acpi_os_sleep(acpi_integer ms) 439void acpi_os_sleep(u64 ms)
440{ 440{
441 schedule_timeout_interruptible(msecs_to_jiffies(ms)); 441 schedule_timeout_interruptible(msecs_to_jiffies(ms));
442} 442}
@@ -603,7 +603,7 @@ acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
603 603
604acpi_status 604acpi_status
605acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg, 605acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
606 acpi_integer value, u32 width) 606 u64 value, u32 width)
607{ 607{
608 int result, size; 608 int result, size;
609 609
diff --git a/drivers/acpi/power_meter.c b/drivers/acpi/power_meter.c
index dc4ffadf8122..834c5af0de4b 100644
--- a/drivers/acpi/power_meter.c
+++ b/drivers/acpi/power_meter.c
@@ -71,17 +71,17 @@ static const struct acpi_device_id power_meter_ids[] = {
71MODULE_DEVICE_TABLE(acpi, power_meter_ids); 71MODULE_DEVICE_TABLE(acpi, power_meter_ids);
72 72
73struct acpi_power_meter_capabilities { 73struct acpi_power_meter_capabilities {
74 acpi_integer flags; 74 u64 flags;
75 acpi_integer units; 75 u64 units;
76 acpi_integer type; 76 u64 type;
77 acpi_integer accuracy; 77 u64 accuracy;
78 acpi_integer sampling_time; 78 u64 sampling_time;
79 acpi_integer min_avg_interval; 79 u64 min_avg_interval;
80 acpi_integer max_avg_interval; 80 u64 max_avg_interval;
81 acpi_integer hysteresis; 81 u64 hysteresis;
82 acpi_integer configurable_cap; 82 u64 configurable_cap;
83 acpi_integer min_cap; 83 u64 min_cap;
84 acpi_integer max_cap; 84 u64 max_cap;
85}; 85};
86 86
87struct acpi_power_meter_resource { 87struct acpi_power_meter_resource {
@@ -93,9 +93,9 @@ struct acpi_power_meter_resource {
93 acpi_string model_number; 93 acpi_string model_number;
94 acpi_string serial_number; 94 acpi_string serial_number;
95 acpi_string oem_info; 95 acpi_string oem_info;
96 acpi_integer power; 96 u64 power;
97 acpi_integer cap; 97 u64 cap;
98 acpi_integer avg_interval; 98 u64 avg_interval;
99 int sensors_valid; 99 int sensors_valid;
100 unsigned long sensors_last_updated; 100 unsigned long sensors_last_updated;
101 struct sensor_device_attribute sensors[NUM_SENSORS]; 101 struct sensor_device_attribute sensors[NUM_SENSORS];
@@ -402,7 +402,7 @@ static ssize_t show_val(struct device *dev,
402 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); 402 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
403 struct acpi_device *acpi_dev = to_acpi_device(dev); 403 struct acpi_device *acpi_dev = to_acpi_device(dev);
404 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; 404 struct acpi_power_meter_resource *resource = acpi_dev->driver_data;
405 acpi_integer val = 0; 405 u64 val = 0;
406 406
407 switch (attr->index) { 407 switch (attr->index) {
408 case 0: 408 case 0:
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 7c0441f63b39..3455d7abf5f3 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -352,7 +352,7 @@ static int acpi_processor_get_power_info_default(struct acpi_processor *pr)
352static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) 352static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
353{ 353{
354 acpi_status status = 0; 354 acpi_status status = 0;
355 acpi_integer count; 355 u64 count;
356 int current_count; 356 int current_count;
357 int i; 357 int i;
358 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 358 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index 1c5d7a8b2fdf..7ded7542fc9d 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -660,7 +660,7 @@ static int acpi_processor_get_throttling_fadt(struct acpi_processor *pr)
660 660
661#ifdef CONFIG_X86 661#ifdef CONFIG_X86
662static int acpi_throttling_rdmsr(struct acpi_processor *pr, 662static int acpi_throttling_rdmsr(struct acpi_processor *pr,
663 acpi_integer * value) 663 u64 *value)
664{ 664{
665 struct cpuinfo_x86 *c; 665 struct cpuinfo_x86 *c;
666 u64 msr_high, msr_low; 666 u64 msr_high, msr_low;
@@ -681,13 +681,13 @@ static int acpi_throttling_rdmsr(struct acpi_processor *pr,
681 rdmsr_safe(MSR_IA32_THERM_CONTROL, 681 rdmsr_safe(MSR_IA32_THERM_CONTROL,
682 (u32 *)&msr_low , (u32 *) &msr_high); 682 (u32 *)&msr_low , (u32 *) &msr_high);
683 msr = (msr_high << 32) | msr_low; 683 msr = (msr_high << 32) | msr_low;
684 *value = (acpi_integer) msr; 684 *value = (u64) msr;
685 ret = 0; 685 ret = 0;
686 } 686 }
687 return ret; 687 return ret;
688} 688}
689 689
690static int acpi_throttling_wrmsr(struct acpi_processor *pr, acpi_integer value) 690static int acpi_throttling_wrmsr(struct acpi_processor *pr, u64 value)
691{ 691{
692 struct cpuinfo_x86 *c; 692 struct cpuinfo_x86 *c;
693 unsigned int cpu; 693 unsigned int cpu;
@@ -711,14 +711,14 @@ static int acpi_throttling_wrmsr(struct acpi_processor *pr, acpi_integer value)
711} 711}
712#else 712#else
713static int acpi_throttling_rdmsr(struct acpi_processor *pr, 713static int acpi_throttling_rdmsr(struct acpi_processor *pr,
714 acpi_integer * value) 714 u64 *value)
715{ 715{
716 printk(KERN_ERR PREFIX 716 printk(KERN_ERR PREFIX
717 "HARDWARE addr space,NOT supported yet\n"); 717 "HARDWARE addr space,NOT supported yet\n");
718 return -1; 718 return -1;
719} 719}
720 720
721static int acpi_throttling_wrmsr(struct acpi_processor *pr, acpi_integer value) 721static int acpi_throttling_wrmsr(struct acpi_processor *pr, u64 value)
722{ 722{
723 printk(KERN_ERR PREFIX 723 printk(KERN_ERR PREFIX
724 "HARDWARE addr space,NOT supported yet\n"); 724 "HARDWARE addr space,NOT supported yet\n");
@@ -727,7 +727,7 @@ static int acpi_throttling_wrmsr(struct acpi_processor *pr, acpi_integer value)
727#endif 727#endif
728 728
729static int acpi_read_throttling_status(struct acpi_processor *pr, 729static int acpi_read_throttling_status(struct acpi_processor *pr,
730 acpi_integer *value) 730 u64 *value)
731{ 731{
732 u32 bit_width, bit_offset; 732 u32 bit_width, bit_offset;
733 u64 ptc_value; 733 u64 ptc_value;
@@ -746,7 +746,7 @@ static int acpi_read_throttling_status(struct acpi_processor *pr,
746 address, (u32 *) &ptc_value, 746 address, (u32 *) &ptc_value,
747 (u32) (bit_width + bit_offset)); 747 (u32) (bit_width + bit_offset));
748 ptc_mask = (1 << bit_width) - 1; 748 ptc_mask = (1 << bit_width) - 1;
749 *value = (acpi_integer) ((ptc_value >> bit_offset) & ptc_mask); 749 *value = (u64) ((ptc_value >> bit_offset) & ptc_mask);
750 ret = 0; 750 ret = 0;
751 break; 751 break;
752 case ACPI_ADR_SPACE_FIXED_HARDWARE: 752 case ACPI_ADR_SPACE_FIXED_HARDWARE:
@@ -760,7 +760,7 @@ static int acpi_read_throttling_status(struct acpi_processor *pr,
760} 760}
761 761
762static int acpi_write_throttling_state(struct acpi_processor *pr, 762static int acpi_write_throttling_state(struct acpi_processor *pr,
763 acpi_integer value) 763 u64 value)
764{ 764{
765 u32 bit_width, bit_offset; 765 u32 bit_width, bit_offset;
766 u64 ptc_value; 766 u64 ptc_value;
@@ -793,7 +793,7 @@ static int acpi_write_throttling_state(struct acpi_processor *pr,
793} 793}
794 794
795static int acpi_get_throttling_state(struct acpi_processor *pr, 795static int acpi_get_throttling_state(struct acpi_processor *pr,
796 acpi_integer value) 796 u64 value)
797{ 797{
798 int i; 798 int i;
799 799
@@ -808,7 +808,7 @@ static int acpi_get_throttling_state(struct acpi_processor *pr,
808} 808}
809 809
810static int acpi_get_throttling_value(struct acpi_processor *pr, 810static int acpi_get_throttling_value(struct acpi_processor *pr,
811 int state, acpi_integer *value) 811 int state, u64 *value)
812{ 812{
813 int ret = -1; 813 int ret = -1;
814 814
@@ -826,7 +826,7 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr)
826{ 826{
827 int state = 0; 827 int state = 0;
828 int ret; 828 int ret;
829 acpi_integer value; 829 u64 value;
830 830
831 if (!pr) 831 if (!pr)
832 return -EINVAL; 832 return -EINVAL;
@@ -993,7 +993,7 @@ static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr,
993 int state, bool force) 993 int state, bool force)
994{ 994{
995 int ret; 995 int ret;
996 acpi_integer value; 996 u64 value;
997 997
998 if (!pr) 998 if (!pr)
999 return -EINVAL; 999 return -EINVAL;
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 811fec10462b..11882dbe2094 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -107,12 +107,12 @@ acpi_extract_package(union acpi_object *package,
107 case ACPI_TYPE_INTEGER: 107 case ACPI_TYPE_INTEGER:
108 switch (format_string[i]) { 108 switch (format_string[i]) {
109 case 'N': 109 case 'N':
110 size_required += sizeof(acpi_integer); 110 size_required += sizeof(u64);
111 tail_offset += sizeof(acpi_integer); 111 tail_offset += sizeof(u64);
112 break; 112 break;
113 case 'S': 113 case 'S':
114 size_required += 114 size_required +=
115 sizeof(char *) + sizeof(acpi_integer) + 115 sizeof(char *) + sizeof(u64) +
116 sizeof(char); 116 sizeof(char);
117 tail_offset += sizeof(char *); 117 tail_offset += sizeof(char *);
118 break; 118 break;
@@ -193,17 +193,17 @@ acpi_extract_package(union acpi_object *package,
193 case ACPI_TYPE_INTEGER: 193 case ACPI_TYPE_INTEGER:
194 switch (format_string[i]) { 194 switch (format_string[i]) {
195 case 'N': 195 case 'N':
196 *((acpi_integer *) head) = 196 *((u64 *) head) =
197 element->integer.value; 197 element->integer.value;
198 head += sizeof(acpi_integer); 198 head += sizeof(u64);
199 break; 199 break;
200 case 'S': 200 case 'S':
201 pointer = (u8 **) head; 201 pointer = (u8 **) head;
202 *pointer = tail; 202 *pointer = tail;
203 *((acpi_integer *) tail) = 203 *((u64 *) tail) =
204 element->integer.value; 204 element->integer.value;
205 head += sizeof(acpi_integer *); 205 head += sizeof(u64 *);
206 tail += sizeof(acpi_integer); 206 tail += sizeof(u64);
207 /* NULL terminate string */ 207 /* NULL terminate string */
208 *tail = (char)0; 208 *tail = (char)0;
209 tail += sizeof(char); 209 tail += sizeof(char);
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index b765790b32be..6e9b49149fce 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -759,7 +759,7 @@ acpi_video_bus_POST_options(struct acpi_video_bus *video,
759static int 759static int
760acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag) 760acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag)
761{ 761{
762 acpi_integer status = 0; 762 u64 status = 0;
763 union acpi_object arg0 = { ACPI_TYPE_INTEGER }; 763 union acpi_object arg0 = { ACPI_TYPE_INTEGER };
764 struct acpi_object_list args = { 1, &arg0 }; 764 struct acpi_object_list args = { 1, &arg0 };
765 765