diff options
-rw-r--r-- | Documentation/thinkpad-acpi.txt | 25 | ||||
-rw-r--r-- | drivers/acpi/numa.c | 2 | ||||
-rw-r--r-- | drivers/acpi/tables/tbinstal.c | 8 | ||||
-rw-r--r-- | drivers/acpi/thermal.c | 13 | ||||
-rw-r--r-- | drivers/acpi/utilities/utcopy.c | 120 | ||||
-rw-r--r-- | drivers/acpi/utilities/utobject.c | 42 | ||||
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 17 | ||||
-rw-r--r-- | drivers/misc/thinkpad_acpi.h | 6 | ||||
-rw-r--r-- | include/acpi/acpi_numa.h | 2 | ||||
-rw-r--r-- | include/acpi/acutils.h | 2 |
10 files changed, 125 insertions, 112 deletions
diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt index 2d4803359a04..9e6b94face4b 100644 --- a/Documentation/thinkpad-acpi.txt +++ b/Documentation/thinkpad-acpi.txt | |||
@@ -138,7 +138,7 @@ Hot keys | |||
138 | -------- | 138 | -------- |
139 | 139 | ||
140 | procfs: /proc/acpi/ibm/hotkey | 140 | procfs: /proc/acpi/ibm/hotkey |
141 | sysfs device attribute: hotkey/* | 141 | sysfs device attribute: hotkey_* |
142 | 142 | ||
143 | Without this driver, only the Fn-F4 key (sleep button) generates an | 143 | Without this driver, only the Fn-F4 key (sleep button) generates an |
144 | ACPI event. With the driver loaded, the hotkey feature enabled and the | 144 | ACPI event. With the driver loaded, the hotkey feature enabled and the |
@@ -196,10 +196,7 @@ The following commands can be written to the /proc/acpi/ibm/hotkey file: | |||
196 | 196 | ||
197 | sysfs notes: | 197 | sysfs notes: |
198 | 198 | ||
199 | The hot keys attributes are in a hotkey/ subdirectory off the | 199 | hotkey_bios_enabled: |
200 | thinkpad device. | ||
201 | |||
202 | bios_enabled: | ||
203 | Returns the status of the hot keys feature when | 200 | Returns the status of the hot keys feature when |
204 | thinkpad-acpi was loaded. Upon module unload, the hot | 201 | thinkpad-acpi was loaded. Upon module unload, the hot |
205 | key feature status will be restored to this value. | 202 | key feature status will be restored to this value. |
@@ -207,19 +204,19 @@ sysfs notes: | |||
207 | 0: hot keys were disabled | 204 | 0: hot keys were disabled |
208 | 1: hot keys were enabled | 205 | 1: hot keys were enabled |
209 | 206 | ||
210 | bios_mask: | 207 | hotkey_bios_mask: |
211 | Returns the hot keys mask when thinkpad-acpi was loaded. | 208 | Returns the hot keys mask when thinkpad-acpi was loaded. |
212 | Upon module unload, the hot keys mask will be restored | 209 | Upon module unload, the hot keys mask will be restored |
213 | to this value. | 210 | to this value. |
214 | 211 | ||
215 | enable: | 212 | hotkey_enable: |
216 | Enables/disables the hot keys feature, and reports | 213 | Enables/disables the hot keys feature, and reports |
217 | current status of the hot keys feature. | 214 | current status of the hot keys feature. |
218 | 215 | ||
219 | 0: disables the hot keys feature / feature disabled | 216 | 0: disables the hot keys feature / feature disabled |
220 | 1: enables the hot keys feature / feature enabled | 217 | 1: enables the hot keys feature / feature enabled |
221 | 218 | ||
222 | mask: | 219 | hotkey_mask: |
223 | bit mask to enable ACPI event generation for each hot | 220 | bit mask to enable ACPI event generation for each hot |
224 | key (see above). Returns the current status of the hot | 221 | key (see above). Returns the current status of the hot |
225 | keys mask, and allows one to modify it. | 222 | keys mask, and allows one to modify it. |
@@ -229,7 +226,7 @@ Bluetooth | |||
229 | --------- | 226 | --------- |
230 | 227 | ||
231 | procfs: /proc/acpi/ibm/bluetooth | 228 | procfs: /proc/acpi/ibm/bluetooth |
232 | sysfs device attribute: bluetooth/enable | 229 | sysfs device attribute: bluetooth_enable |
233 | 230 | ||
234 | This feature shows the presence and current state of a ThinkPad | 231 | This feature shows the presence and current state of a ThinkPad |
235 | Bluetooth device in the internal ThinkPad CDC slot. | 232 | Bluetooth device in the internal ThinkPad CDC slot. |
@@ -244,7 +241,7 @@ If Bluetooth is installed, the following commands can be used: | |||
244 | Sysfs notes: | 241 | Sysfs notes: |
245 | 242 | ||
246 | If the Bluetooth CDC card is installed, it can be enabled / | 243 | If the Bluetooth CDC card is installed, it can be enabled / |
247 | disabled through the "bluetooth/enable" thinkpad-acpi device | 244 | disabled through the "bluetooth_enable" thinkpad-acpi device |
248 | attribute, and its current status can also be queried. | 245 | attribute, and its current status can also be queried. |
249 | 246 | ||
250 | enable: | 247 | enable: |
@@ -252,7 +249,7 @@ Sysfs notes: | |||
252 | 1: enables Bluetooth / Bluetooth is enabled. | 249 | 1: enables Bluetooth / Bluetooth is enabled. |
253 | 250 | ||
254 | Note: this interface will be probably be superseeded by the | 251 | Note: this interface will be probably be superseeded by the |
255 | generic rfkill class. | 252 | generic rfkill class, so it is NOT to be considered stable yet. |
256 | 253 | ||
257 | Video output control -- /proc/acpi/ibm/video | 254 | Video output control -- /proc/acpi/ibm/video |
258 | -------------------------------------------- | 255 | -------------------------------------------- |
@@ -898,7 +895,7 @@ EXPERIMENTAL: WAN | |||
898 | ----------------- | 895 | ----------------- |
899 | 896 | ||
900 | procfs: /proc/acpi/ibm/wan | 897 | procfs: /proc/acpi/ibm/wan |
901 | sysfs device attribute: wwan/enable | 898 | sysfs device attribute: wwan_enable |
902 | 899 | ||
903 | This feature is marked EXPERIMENTAL because the implementation | 900 | This feature is marked EXPERIMENTAL because the implementation |
904 | directly accesses hardware registers and may not work as expected. USE | 901 | directly accesses hardware registers and may not work as expected. USE |
@@ -921,7 +918,7 @@ If the W-WAN card is installed, the following commands can be used: | |||
921 | Sysfs notes: | 918 | Sysfs notes: |
922 | 919 | ||
923 | If the W-WAN card is installed, it can be enabled / | 920 | If the W-WAN card is installed, it can be enabled / |
924 | disabled through the "wwan/enable" thinkpad-acpi device | 921 | disabled through the "wwan_enable" thinkpad-acpi device |
925 | attribute, and its current status can also be queried. | 922 | attribute, and its current status can also be queried. |
926 | 923 | ||
927 | enable: | 924 | enable: |
@@ -929,7 +926,7 @@ Sysfs notes: | |||
929 | 1: enables WWAN card / WWAN card is enabled. | 926 | 1: enables WWAN card / WWAN card is enabled. |
930 | 927 | ||
931 | Note: this interface will be probably be superseeded by the | 928 | Note: this interface will be probably be superseeded by the |
932 | generic rfkill class. | 929 | generic rfkill class, so it is NOT to be considered stable yet. |
933 | 930 | ||
934 | Multiple Commands, Module Parameters | 931 | Multiple Commands, Module Parameters |
935 | ------------------------------------ | 932 | ------------------------------------ |
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index a2efae8a4c4e..0c9f15c54e8c 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -59,7 +59,7 @@ int node_to_pxm(int node) | |||
59 | return node_to_pxm_map[node]; | 59 | return node_to_pxm_map[node]; |
60 | } | 60 | } |
61 | 61 | ||
62 | int __cpuinit acpi_map_pxm_to_node(int pxm) | 62 | int acpi_map_pxm_to_node(int pxm) |
63 | { | 63 | { |
64 | int node = pxm_to_node_map[pxm]; | 64 | int node = pxm_to_node_map[pxm]; |
65 | 65 | ||
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c index 0e7b121a99ce..3bc0c67a9283 100644 --- a/drivers/acpi/tables/tbinstal.c +++ b/drivers/acpi/tables/tbinstal.c | |||
@@ -123,14 +123,14 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, | |||
123 | } | 123 | } |
124 | } | 124 | } |
125 | 125 | ||
126 | /* The table must be either an SSDT or a PSDT */ | 126 | /* The table must be either an SSDT or a PSDT or an OEMx */ |
127 | 127 | ||
128 | if ((!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_PSDT)) | 128 | if ((!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_PSDT)) |
129 | && | 129 | && |
130 | (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT))) | 130 | (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT)) |
131 | { | 131 | && (strncmp(table_desc->pointer->signature, "OEM", 3))) { |
132 | ACPI_ERROR((AE_INFO, | 132 | ACPI_ERROR((AE_INFO, |
133 | "Table has invalid signature [%4.4s], must be SSDT or PSDT", | 133 | "Table has invalid signature [%4.4s], must be SSDT, PSDT or OEMx", |
134 | table_desc->pointer->signature)); | 134 | table_desc->pointer->signature)); |
135 | return_ACPI_STATUS(AE_BAD_SIGNATURE); | 135 | return_ACPI_STATUS(AE_BAD_SIGNATURE); |
136 | } | 136 | } |
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 1ada017d01ef..194ecfe8b360 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -827,6 +827,7 @@ static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file) | |||
827 | static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset) | 827 | static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset) |
828 | { | 828 | { |
829 | struct acpi_thermal *tz = seq->private; | 829 | struct acpi_thermal *tz = seq->private; |
830 | struct acpi_device *device; | ||
830 | int i = 0; | 831 | int i = 0; |
831 | int j = 0; | 832 | int j = 0; |
832 | 833 | ||
@@ -849,9 +850,8 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset) | |||
849 | tz->trips.passive.tc1, tz->trips.passive.tc2, | 850 | tz->trips.passive.tc1, tz->trips.passive.tc2, |
850 | tz->trips.passive.tsp); | 851 | tz->trips.passive.tsp); |
851 | for (j = 0; j < tz->trips.passive.devices.count; j++) { | 852 | for (j = 0; j < tz->trips.passive.devices.count; j++) { |
852 | 853 | acpi_bus_get_device(tz->trips.passive.devices.handles[j], &device); | |
853 | seq_printf(seq, "0x%p ", | 854 | seq_printf(seq, "%4.4s ", acpi_device_bid(device)); |
854 | tz->trips.passive.devices.handles[j]); | ||
855 | } | 855 | } |
856 | seq_puts(seq, "\n"); | 856 | seq_puts(seq, "\n"); |
857 | } | 857 | } |
@@ -862,9 +862,10 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset) | |||
862 | seq_printf(seq, "active[%d]: %ld C: devices=", | 862 | seq_printf(seq, "active[%d]: %ld C: devices=", |
863 | i, | 863 | i, |
864 | KELVIN_TO_CELSIUS(tz->trips.active[i].temperature)); | 864 | KELVIN_TO_CELSIUS(tz->trips.active[i].temperature)); |
865 | for (j = 0; j < tz->trips.active[i].devices.count; j++) | 865 | for (j = 0; j < tz->trips.active[i].devices.count; j++){ |
866 | seq_printf(seq, "0x%p ", | 866 | acpi_bus_get_device(tz->trips.active[i].devices.handles[j], &device); |
867 | tz->trips.active[i].devices.handles[j]); | 867 | seq_printf(seq, "%4.4s ", acpi_device_bid(device)); |
868 | } | ||
868 | seq_puts(seq, "\n"); | 869 | seq_puts(seq, "\n"); |
869 | } | 870 | } |
870 | 871 | ||
diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c index 4c1e00874dff..879eaa10d3ae 100644 --- a/drivers/acpi/utilities/utcopy.c +++ b/drivers/acpi/utilities/utcopy.c | |||
@@ -68,6 +68,10 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *user_obj, | |||
68 | union acpi_operand_object **return_obj); | 68 | union acpi_operand_object **return_obj); |
69 | 69 | ||
70 | static acpi_status | 70 | static acpi_status |
71 | acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object, | ||
72 | union acpi_operand_object **internal_object); | ||
73 | |||
74 | static acpi_status | ||
71 | acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, | 75 | acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, |
72 | union acpi_operand_object *dest_desc); | 76 | union acpi_operand_object *dest_desc); |
73 | 77 | ||
@@ -518,77 +522,73 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, | |||
518 | return_ACPI_STATUS(AE_NO_MEMORY); | 522 | return_ACPI_STATUS(AE_NO_MEMORY); |
519 | } | 523 | } |
520 | 524 | ||
521 | #ifdef ACPI_FUTURE_IMPLEMENTATION | ||
522 | /* Code to convert packages that are parameters to control methods */ | ||
523 | |||
524 | /******************************************************************************* | 525 | /******************************************************************************* |
525 | * | 526 | * |
526 | * FUNCTION: acpi_ut_copy_epackage_to_ipackage | 527 | * FUNCTION: acpi_ut_copy_epackage_to_ipackage |
527 | * | 528 | * |
528 | * PARAMETERS: *internal_object - Pointer to the object we are returning | 529 | * PARAMETERS: external_object - The external object to be converted |
529 | * *Buffer - Where the object is returned | 530 | * internal_object - Where the internal object is returned |
530 | * *space_used - Where the length of the object is returned | ||
531 | * | 531 | * |
532 | * RETURN: Status | 532 | * RETURN: Status |
533 | * | 533 | * |
534 | * DESCRIPTION: This function is called to place a package object in a user | 534 | * DESCRIPTION: Copy an external package object to an internal package. |
535 | * buffer. A package object by definition contains other objects. | 535 | * Handles nested packages. |
536 | * | ||
537 | * The buffer is assumed to have sufficient space for the object. | ||
538 | * The caller must have verified the buffer length needed using the | ||
539 | * acpi_ut_get_object_size function before calling this function. | ||
540 | * | 536 | * |
541 | ******************************************************************************/ | 537 | ******************************************************************************/ |
542 | 538 | ||
543 | static acpi_status | 539 | static acpi_status |
544 | acpi_ut_copy_epackage_to_ipackage(union acpi_operand_object *internal_object, | 540 | acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object, |
545 | u8 * buffer, u32 * space_used) | 541 | union acpi_operand_object **internal_object) |
546 | { | 542 | { |
547 | u8 *free_space; | 543 | acpi_status status = AE_OK; |
548 | union acpi_object *external_object; | 544 | union acpi_operand_object *package_object; |
549 | u32 length = 0; | 545 | union acpi_operand_object **package_elements; |
550 | u32 this_index; | 546 | acpi_native_uint i; |
551 | u32 object_space = 0; | ||
552 | union acpi_operand_object *this_internal_obj; | ||
553 | union acpi_object *this_external_obj; | ||
554 | 547 | ||
555 | ACPI_FUNCTION_TRACE(ut_copy_epackage_to_ipackage); | 548 | ACPI_FUNCTION_TRACE(ut_copy_epackage_to_ipackage); |
556 | 549 | ||
557 | /* | 550 | /* Create the package object */ |
558 | * First package at head of the buffer | ||
559 | */ | ||
560 | external_object = (union acpi_object *)buffer; | ||
561 | 551 | ||
562 | /* | 552 | package_object = |
563 | * Free space begins right after the first package | 553 | acpi_ut_create_package_object(external_object->package.count); |
564 | */ | 554 | if (!package_object) { |
565 | free_space = buffer + sizeof(union acpi_object); | 555 | return_ACPI_STATUS(AE_NO_MEMORY); |
556 | } | ||
566 | 557 | ||
567 | external_object->type = ACPI_GET_OBJECT_TYPE(internal_object); | 558 | package_elements = package_object->package.elements; |
568 | external_object->package.count = internal_object->package.count; | ||
569 | external_object->package.elements = (union acpi_object *)free_space; | ||
570 | 559 | ||
571 | /* | 560 | /* |
572 | * Build an array of ACPI_OBJECTS in the buffer | 561 | * Recursive implementation. Probably ok, since nested external packages |
573 | * and move the free space past it | 562 | * as parameters should be very rare. |
574 | */ | 563 | */ |
575 | free_space += | 564 | for (i = 0; i < external_object->package.count; i++) { |
576 | external_object->package.count * sizeof(union acpi_object); | 565 | status = |
566 | acpi_ut_copy_eobject_to_iobject(&external_object->package. | ||
567 | elements[i], | ||
568 | &package_elements[i]); | ||
569 | if (ACPI_FAILURE(status)) { | ||
577 | 570 | ||
578 | /* Call walk_package */ | 571 | /* Truncate package and delete it */ |
579 | 572 | ||
580 | } | 573 | package_object->package.count = i; |
574 | package_elements[i] = NULL; | ||
575 | acpi_ut_remove_reference(package_object); | ||
576 | return_ACPI_STATUS(status); | ||
577 | } | ||
578 | } | ||
581 | 579 | ||
582 | #endif /* Future implementation */ | 580 | *internal_object = package_object; |
581 | return_ACPI_STATUS(status); | ||
582 | } | ||
583 | 583 | ||
584 | /******************************************************************************* | 584 | /******************************************************************************* |
585 | * | 585 | * |
586 | * FUNCTION: acpi_ut_copy_eobject_to_iobject | 586 | * FUNCTION: acpi_ut_copy_eobject_to_iobject |
587 | * | 587 | * |
588 | * PARAMETERS: *internal_object - The external object to be converted | 588 | * PARAMETERS: external_object - The external object to be converted |
589 | * *buffer_ptr - Where the internal object is returned | 589 | * internal_object - Where the internal object is returned |
590 | * | 590 | * |
591 | * RETURN: Status - the status of the call | 591 | * RETURN: Status - the status of the call |
592 | * | 592 | * |
593 | * DESCRIPTION: Converts an external object to an internal object. | 593 | * DESCRIPTION: Converts an external object to an internal object. |
594 | * | 594 | * |
@@ -603,16 +603,10 @@ acpi_ut_copy_eobject_to_iobject(union acpi_object *external_object, | |||
603 | ACPI_FUNCTION_TRACE(ut_copy_eobject_to_iobject); | 603 | ACPI_FUNCTION_TRACE(ut_copy_eobject_to_iobject); |
604 | 604 | ||
605 | if (external_object->type == ACPI_TYPE_PACKAGE) { | 605 | if (external_object->type == ACPI_TYPE_PACKAGE) { |
606 | /* | 606 | status = |
607 | * Packages as external input to control methods are not supported, | 607 | acpi_ut_copy_epackage_to_ipackage(external_object, |
608 | */ | 608 | internal_object); |
609 | ACPI_ERROR((AE_INFO, | 609 | } else { |
610 | "Packages as parameters not implemented!")); | ||
611 | |||
612 | return_ACPI_STATUS(AE_NOT_IMPLEMENTED); | ||
613 | } | ||
614 | |||
615 | else { | ||
616 | /* | 610 | /* |
617 | * Build a simple object (no nested objects) | 611 | * Build a simple object (no nested objects) |
618 | */ | 612 | */ |
@@ -803,33 +797,19 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type, | |||
803 | * Create and build the package object | 797 | * Create and build the package object |
804 | */ | 798 | */ |
805 | target_object = | 799 | target_object = |
806 | acpi_ut_create_internal_object(ACPI_TYPE_PACKAGE); | 800 | acpi_ut_create_package_object(source_object->package.count); |
807 | if (!target_object) { | 801 | if (!target_object) { |
808 | return (AE_NO_MEMORY); | 802 | return (AE_NO_MEMORY); |
809 | } | 803 | } |
810 | 804 | ||
811 | target_object->package.count = source_object->package.count; | ||
812 | target_object->common.flags = source_object->common.flags; | 805 | target_object->common.flags = source_object->common.flags; |
813 | 806 | ||
814 | /* | 807 | /* Pass the new package object back to the package walk routine */ |
815 | * Create the object array | ||
816 | */ | ||
817 | target_object->package.elements = | ||
818 | ACPI_ALLOCATE_ZEROED(((acpi_size) source_object->package. | ||
819 | count + 1) * sizeof(void *)); | ||
820 | if (!target_object->package.elements) { | ||
821 | status = AE_NO_MEMORY; | ||
822 | goto error_exit; | ||
823 | } | ||
824 | 808 | ||
825 | /* | ||
826 | * Pass the new package object back to the package walk routine | ||
827 | */ | ||
828 | state->pkg.this_target_obj = target_object; | 809 | state->pkg.this_target_obj = target_object; |
829 | 810 | ||
830 | /* | 811 | /* Store the object pointer in the parent package object */ |
831 | * Store the object pointer in the parent package object | 812 | |
832 | */ | ||
833 | *this_target_ptr = target_object; | 813 | *this_target_ptr = target_object; |
834 | break; | 814 | break; |
835 | 815 | ||
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c index 4696124759e1..db0b9bac7945 100644 --- a/drivers/acpi/utilities/utobject.c +++ b/drivers/acpi/utilities/utobject.c | |||
@@ -146,6 +146,48 @@ union acpi_operand_object *acpi_ut_create_internal_object_dbg(char *module_name, | |||
146 | 146 | ||
147 | /******************************************************************************* | 147 | /******************************************************************************* |
148 | * | 148 | * |
149 | * FUNCTION: acpi_ut_create_package_object | ||
150 | * | ||
151 | * PARAMETERS: Count - Number of package elements | ||
152 | * | ||
153 | * RETURN: Pointer to a new Package object, null on failure | ||
154 | * | ||
155 | * DESCRIPTION: Create a fully initialized package object | ||
156 | * | ||
157 | ******************************************************************************/ | ||
158 | |||
159 | union acpi_operand_object *acpi_ut_create_package_object(u32 count) | ||
160 | { | ||
161 | union acpi_operand_object *package_desc; | ||
162 | union acpi_operand_object **package_elements; | ||
163 | |||
164 | ACPI_FUNCTION_TRACE_U32(ut_create_package_object, count); | ||
165 | |||
166 | /* Create a new Package object */ | ||
167 | |||
168 | package_desc = acpi_ut_create_internal_object(ACPI_TYPE_PACKAGE); | ||
169 | if (!package_desc) { | ||
170 | return_PTR(NULL); | ||
171 | } | ||
172 | |||
173 | /* | ||
174 | * Create the element array. Count+1 allows the array to be null | ||
175 | * terminated. | ||
176 | */ | ||
177 | package_elements = ACPI_ALLOCATE_ZEROED((acpi_size) | ||
178 | (count + 1) * sizeof(void *)); | ||
179 | if (!package_elements) { | ||
180 | ACPI_FREE(package_desc); | ||
181 | return_PTR(NULL); | ||
182 | } | ||
183 | |||
184 | package_desc->package.count = count; | ||
185 | package_desc->package.elements = package_elements; | ||
186 | return_PTR(package_desc); | ||
187 | } | ||
188 | |||
189 | /******************************************************************************* | ||
190 | * | ||
149 | * FUNCTION: acpi_ut_create_buffer_object | 191 | * FUNCTION: acpi_ut_create_buffer_object |
150 | * | 192 | * |
151 | * PARAMETERS: buffer_size - Size of buffer to be created | 193 | * PARAMETERS: buffer_size - Size of buffer to be created |
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 6c36a55cb3d1..95c0b96e83f2 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -740,7 +740,7 @@ static ssize_t hotkey_enable_store(struct device *dev, | |||
740 | } | 740 | } |
741 | 741 | ||
742 | static struct device_attribute dev_attr_hotkey_enable = | 742 | static struct device_attribute dev_attr_hotkey_enable = |
743 | __ATTR(enable, S_IWUSR | S_IRUGO, | 743 | __ATTR(hotkey_enable, S_IWUSR | S_IRUGO, |
744 | hotkey_enable_show, hotkey_enable_store); | 744 | hotkey_enable_show, hotkey_enable_store); |
745 | 745 | ||
746 | /* sysfs hotkey mask --------------------------------------------------- */ | 746 | /* sysfs hotkey mask --------------------------------------------------- */ |
@@ -775,7 +775,7 @@ static ssize_t hotkey_mask_store(struct device *dev, | |||
775 | } | 775 | } |
776 | 776 | ||
777 | static struct device_attribute dev_attr_hotkey_mask = | 777 | static struct device_attribute dev_attr_hotkey_mask = |
778 | __ATTR(mask, S_IWUSR | S_IRUGO, | 778 | __ATTR(hotkey_mask, S_IWUSR | S_IRUGO, |
779 | hotkey_mask_show, hotkey_mask_store); | 779 | hotkey_mask_show, hotkey_mask_store); |
780 | 780 | ||
781 | /* sysfs hotkey bios_enabled ------------------------------------------- */ | 781 | /* sysfs hotkey bios_enabled ------------------------------------------- */ |
@@ -787,7 +787,7 @@ static ssize_t hotkey_bios_enabled_show(struct device *dev, | |||
787 | } | 787 | } |
788 | 788 | ||
789 | static struct device_attribute dev_attr_hotkey_bios_enabled = | 789 | static struct device_attribute dev_attr_hotkey_bios_enabled = |
790 | __ATTR(bios_enabled, S_IRUGO, hotkey_bios_enabled_show, NULL); | 790 | __ATTR(hotkey_bios_enabled, S_IRUGO, hotkey_bios_enabled_show, NULL); |
791 | 791 | ||
792 | /* sysfs hotkey bios_mask ---------------------------------------------- */ | 792 | /* sysfs hotkey bios_mask ---------------------------------------------- */ |
793 | static ssize_t hotkey_bios_mask_show(struct device *dev, | 793 | static ssize_t hotkey_bios_mask_show(struct device *dev, |
@@ -798,7 +798,7 @@ static ssize_t hotkey_bios_mask_show(struct device *dev, | |||
798 | } | 798 | } |
799 | 799 | ||
800 | static struct device_attribute dev_attr_hotkey_bios_mask = | 800 | static struct device_attribute dev_attr_hotkey_bios_mask = |
801 | __ATTR(bios_mask, S_IRUGO, hotkey_bios_mask_show, NULL); | 801 | __ATTR(hotkey_bios_mask, S_IRUGO, hotkey_bios_mask_show, NULL); |
802 | 802 | ||
803 | /* --------------------------------------------------------------------- */ | 803 | /* --------------------------------------------------------------------- */ |
804 | 804 | ||
@@ -824,8 +824,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
824 | str_supported(tp_features.hotkey)); | 824 | str_supported(tp_features.hotkey)); |
825 | 825 | ||
826 | if (tp_features.hotkey) { | 826 | if (tp_features.hotkey) { |
827 | hotkey_dev_attributes = create_attr_set(4, | 827 | hotkey_dev_attributes = create_attr_set(4, NULL); |
828 | TPACPI_HOTKEY_SYSFS_GROUP); | ||
829 | if (!hotkey_dev_attributes) | 828 | if (!hotkey_dev_attributes) |
830 | return -ENOMEM; | 829 | return -ENOMEM; |
831 | res = add_to_attr_set(hotkey_dev_attributes, | 830 | res = add_to_attr_set(hotkey_dev_attributes, |
@@ -1050,7 +1049,7 @@ static ssize_t bluetooth_enable_store(struct device *dev, | |||
1050 | } | 1049 | } |
1051 | 1050 | ||
1052 | static struct device_attribute dev_attr_bluetooth_enable = | 1051 | static struct device_attribute dev_attr_bluetooth_enable = |
1053 | __ATTR(enable, S_IWUSR | S_IRUGO, | 1052 | __ATTR(bluetooth_enable, S_IWUSR | S_IRUGO, |
1054 | bluetooth_enable_show, bluetooth_enable_store); | 1053 | bluetooth_enable_show, bluetooth_enable_store); |
1055 | 1054 | ||
1056 | /* --------------------------------------------------------------------- */ | 1055 | /* --------------------------------------------------------------------- */ |
@@ -1061,7 +1060,6 @@ static struct attribute *bluetooth_attributes[] = { | |||
1061 | }; | 1060 | }; |
1062 | 1061 | ||
1063 | static const struct attribute_group bluetooth_attr_group = { | 1062 | static const struct attribute_group bluetooth_attr_group = { |
1064 | .name = TPACPI_BLUETH_SYSFS_GROUP, | ||
1065 | .attrs = bluetooth_attributes, | 1063 | .attrs = bluetooth_attributes, |
1066 | }; | 1064 | }; |
1067 | 1065 | ||
@@ -1215,7 +1213,7 @@ static ssize_t wan_enable_store(struct device *dev, | |||
1215 | } | 1213 | } |
1216 | 1214 | ||
1217 | static struct device_attribute dev_attr_wan_enable = | 1215 | static struct device_attribute dev_attr_wan_enable = |
1218 | __ATTR(enable, S_IWUSR | S_IRUGO, | 1216 | __ATTR(wwan_enable, S_IWUSR | S_IRUGO, |
1219 | wan_enable_show, wan_enable_store); | 1217 | wan_enable_show, wan_enable_store); |
1220 | 1218 | ||
1221 | /* --------------------------------------------------------------------- */ | 1219 | /* --------------------------------------------------------------------- */ |
@@ -1226,7 +1224,6 @@ static struct attribute *wan_attributes[] = { | |||
1226 | }; | 1224 | }; |
1227 | 1225 | ||
1228 | static const struct attribute_group wan_attr_group = { | 1226 | static const struct attribute_group wan_attr_group = { |
1229 | .name = TPACPI_WAN_SYSFS_GROUP, | ||
1230 | .attrs = wan_attributes, | 1227 | .attrs = wan_attributes, |
1231 | }; | 1228 | }; |
1232 | 1229 | ||
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h index 440145a02617..72d62f2dabb9 100644 --- a/drivers/misc/thinkpad_acpi.h +++ b/drivers/misc/thinkpad_acpi.h | |||
@@ -278,8 +278,6 @@ static int beep_write(char *buf); | |||
278 | * Bluetooth subdriver | 278 | * Bluetooth subdriver |
279 | */ | 279 | */ |
280 | 280 | ||
281 | #define TPACPI_BLUETH_SYSFS_GROUP "bluetooth" | ||
282 | |||
283 | enum { | 281 | enum { |
284 | /* ACPI GBDC/SBDC bits */ | 282 | /* ACPI GBDC/SBDC bits */ |
285 | TP_ACPI_BLUETOOTH_HWPRESENT = 0x01, /* Bluetooth hw available */ | 283 | TP_ACPI_BLUETOOTH_HWPRESENT = 0x01, /* Bluetooth hw available */ |
@@ -416,8 +414,6 @@ static int fan_write_cmd_watchdog(const char *cmd, int *rc); | |||
416 | * Hotkey subdriver | 414 | * Hotkey subdriver |
417 | */ | 415 | */ |
418 | 416 | ||
419 | #define TPACPI_HOTKEY_SYSFS_GROUP "hotkey" | ||
420 | |||
421 | static int hotkey_orig_status; | 417 | static int hotkey_orig_status; |
422 | static int hotkey_orig_mask; | 418 | static int hotkey_orig_mask; |
423 | 419 | ||
@@ -553,8 +549,6 @@ static int volume_write(char *buf); | |||
553 | * Wan subdriver | 549 | * Wan subdriver |
554 | */ | 550 | */ |
555 | 551 | ||
556 | #define TPACPI_WAN_SYSFS_GROUP "wwan" | ||
557 | |||
558 | enum { | 552 | enum { |
559 | /* ACPI GWAN/SWAN bits */ | 553 | /* ACPI GWAN/SWAN bits */ |
560 | TP_ACPI_WANCARD_HWPRESENT = 0x01, /* Wan hw available */ | 554 | TP_ACPI_WANCARD_HWPRESENT = 0x01, /* Wan hw available */ |
diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h index b62cd36ff324..e2fcee2b340d 100644 --- a/include/acpi/acpi_numa.h +++ b/include/acpi/acpi_numa.h | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | extern int pxm_to_node(int); | 14 | extern int pxm_to_node(int); |
15 | extern int node_to_pxm(int); | 15 | extern int node_to_pxm(int); |
16 | extern int __cpuinit acpi_map_pxm_to_node(int); | 16 | extern int acpi_map_pxm_to_node(int); |
17 | extern void __cpuinit acpi_unmap_pxm_to_node(int); | 17 | extern void __cpuinit acpi_unmap_pxm_to_node(int); |
18 | 18 | ||
19 | #endif /* CONFIG_ACPI_NUMA */ | 19 | #endif /* CONFIG_ACPI_NUMA */ |
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index 15a838862cd4..a87ef1c8d46b 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h | |||
@@ -390,6 +390,8 @@ void acpi_ut_delete_object_desc(union acpi_operand_object *object); | |||
390 | 390 | ||
391 | u8 acpi_ut_valid_internal_object(void *object); | 391 | u8 acpi_ut_valid_internal_object(void *object); |
392 | 392 | ||
393 | union acpi_operand_object *acpi_ut_create_package_object(u32 count); | ||
394 | |||
393 | union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size); | 395 | union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size); |
394 | 396 | ||
395 | union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size); | 397 | union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size); |