diff options
Diffstat (limited to 'drivers/acpi/acpica/utmutex.c')
-rw-r--r-- | drivers/acpi/acpica/utmutex.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/acpi/acpica/utmutex.c b/drivers/acpi/acpica/utmutex.c index 14eb52c4d64..26c93a748e6 100644 --- a/drivers/acpi/acpica/utmutex.c +++ b/drivers/acpi/acpica/utmutex.c | |||
@@ -60,7 +60,8 @@ static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id); | |||
60 | * | 60 | * |
61 | * RETURN: Status | 61 | * RETURN: Status |
62 | * | 62 | * |
63 | * DESCRIPTION: Create the system mutex objects. | 63 | * DESCRIPTION: Create the system mutex objects. This includes mutexes, |
64 | * spin locks, and reader/writer locks. | ||
64 | * | 65 | * |
65 | ******************************************************************************/ | 66 | ******************************************************************************/ |
66 | 67 | ||
@@ -71,9 +72,8 @@ acpi_status acpi_ut_mutex_initialize(void) | |||
71 | 72 | ||
72 | ACPI_FUNCTION_TRACE(ut_mutex_initialize); | 73 | ACPI_FUNCTION_TRACE(ut_mutex_initialize); |
73 | 74 | ||
74 | /* | 75 | /* Create each of the predefined mutex objects */ |
75 | * Create each of the predefined mutex objects | 76 | |
76 | */ | ||
77 | for (i = 0; i < ACPI_NUM_MUTEX; i++) { | 77 | for (i = 0; i < ACPI_NUM_MUTEX; i++) { |
78 | status = acpi_ut_create_mutex(i); | 78 | status = acpi_ut_create_mutex(i); |
79 | if (ACPI_FAILURE(status)) { | 79 | if (ACPI_FAILURE(status)) { |
@@ -86,6 +86,9 @@ acpi_status acpi_ut_mutex_initialize(void) | |||
86 | spin_lock_init(acpi_gbl_gpe_lock); | 86 | spin_lock_init(acpi_gbl_gpe_lock); |
87 | spin_lock_init(acpi_gbl_hardware_lock); | 87 | spin_lock_init(acpi_gbl_hardware_lock); |
88 | 88 | ||
89 | /* Create the reader/writer lock for namespace access */ | ||
90 | |||
91 | status = acpi_ut_create_rw_lock(&acpi_gbl_namespace_rw_lock); | ||
89 | return_ACPI_STATUS(status); | 92 | return_ACPI_STATUS(status); |
90 | } | 93 | } |
91 | 94 | ||
@@ -97,7 +100,8 @@ acpi_status acpi_ut_mutex_initialize(void) | |||
97 | * | 100 | * |
98 | * RETURN: None. | 101 | * RETURN: None. |
99 | * | 102 | * |
100 | * DESCRIPTION: Delete all of the system mutex objects. | 103 | * DESCRIPTION: Delete all of the system mutex objects. This includes mutexes, |
104 | * spin locks, and reader/writer locks. | ||
101 | * | 105 | * |
102 | ******************************************************************************/ | 106 | ******************************************************************************/ |
103 | 107 | ||
@@ -107,9 +111,8 @@ void acpi_ut_mutex_terminate(void) | |||
107 | 111 | ||
108 | ACPI_FUNCTION_TRACE(ut_mutex_terminate); | 112 | ACPI_FUNCTION_TRACE(ut_mutex_terminate); |
109 | 113 | ||
110 | /* | 114 | /* Delete each predefined mutex object */ |
111 | * Delete each predefined mutex object | 115 | |
112 | */ | ||
113 | for (i = 0; i < ACPI_NUM_MUTEX; i++) { | 116 | for (i = 0; i < ACPI_NUM_MUTEX; i++) { |
114 | (void)acpi_ut_delete_mutex(i); | 117 | (void)acpi_ut_delete_mutex(i); |
115 | } | 118 | } |
@@ -118,6 +121,10 @@ void acpi_ut_mutex_terminate(void) | |||
118 | 121 | ||
119 | acpi_os_delete_lock(acpi_gbl_gpe_lock); | 122 | acpi_os_delete_lock(acpi_gbl_gpe_lock); |
120 | acpi_os_delete_lock(acpi_gbl_hardware_lock); | 123 | acpi_os_delete_lock(acpi_gbl_hardware_lock); |
124 | |||
125 | /* Delete the reader/writer lock */ | ||
126 | |||
127 | acpi_ut_delete_rw_lock(&acpi_gbl_namespace_rw_lock); | ||
121 | return_VOID; | 128 | return_VOID; |
122 | } | 129 | } |
123 | 130 | ||