diff options
author | Bob Moore <robert.moore@intel.com> | 2009-04-21 22:48:57 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-05-27 00:30:48 -0400 |
commit | 33a1d461d294722dd15ffe17651bdd48b5763883 (patch) | |
tree | 4e4dd08443d0a6454e3b054eb693c0c7180d0922 /drivers/acpi | |
parent | 8eb7b2477c4e4fec4788605e4edb5f7acafb59ff (diff) |
ACPICA: Change behavior of object copy for mutex/event objects
When copying these internal objects, cannot simply copy the
underlying OS object. A new OS object must be created.
Signed-off-by: Bob Moore <robert.moore@intel.com>
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/acpica/utcopy.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/utcopy.c b/drivers/acpi/acpica/utcopy.c index 919624f123d5..0f0c64bf8ac9 100644 --- a/drivers/acpi/acpica/utcopy.c +++ b/drivers/acpi/acpica/utcopy.c | |||
@@ -676,6 +676,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, | |||
676 | { | 676 | { |
677 | u16 reference_count; | 677 | u16 reference_count; |
678 | union acpi_operand_object *next_object; | 678 | union acpi_operand_object *next_object; |
679 | acpi_status status; | ||
679 | 680 | ||
680 | /* Save fields from destination that we don't want to overwrite */ | 681 | /* Save fields from destination that we don't want to overwrite */ |
681 | 682 | ||
@@ -768,6 +769,28 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, | |||
768 | } | 769 | } |
769 | break; | 770 | break; |
770 | 771 | ||
772 | /* | ||
773 | * For Mutex and Event objects, we cannot simply copy the underlying | ||
774 | * OS object. We must create a new one. | ||
775 | */ | ||
776 | case ACPI_TYPE_MUTEX: | ||
777 | |||
778 | status = acpi_os_create_mutex(&dest_desc->mutex.os_mutex); | ||
779 | if (ACPI_FAILURE(status)) { | ||
780 | return status; | ||
781 | } | ||
782 | break; | ||
783 | |||
784 | case ACPI_TYPE_EVENT: | ||
785 | |||
786 | status = acpi_os_create_semaphore(ACPI_NO_UNIT_LIMIT, 0, | ||
787 | &dest_desc->event. | ||
788 | os_semaphore); | ||
789 | if (ACPI_FAILURE(status)) { | ||
790 | return status; | ||
791 | } | ||
792 | break; | ||
793 | |||
771 | default: | 794 | default: |
772 | /* Nothing to do for other simple objects */ | 795 | /* Nothing to do for other simple objects */ |
773 | break; | 796 | break; |