aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utcopy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/utcopy.c')
-rw-r--r--drivers/acpi/acpica/utcopy.c23
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;