diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-05 11:16:25 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-05 11:16:25 -0700 |
commit | 32fb6c17566ec66de87324a834c7776f40e35e78 (patch) | |
tree | 87b8ed5d66495536fbb452255c3eacd1cfb0c43a /drivers/acpi/acpica/utmutex.c | |
parent | 45e36c1666aa6c8b0c538abcf984b336184d8c3f (diff) | |
parent | 7ec0a7290797f57b780f792d12f4bcc19c83aa4f (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (140 commits)
ACPI: processor: use .notify method instead of installing handler directly
ACPI: button: use .notify method instead of installing handler directly
ACPI: support acpi_device_ops .notify methods
toshiba-acpi: remove MAINTAINERS entry
ACPI: battery: asynchronous init
acer-wmi: Update copyright notice & documentation
acer-wmi: Cleanup the failure cleanup handling
acer-wmi: Blacklist Acer Aspire One
video: build fix
thinkpad-acpi: rework brightness support
thinkpad-acpi: enhanced debugging messages for the fan subdriver
thinkpad-acpi: enhanced debugging messages for the hotkey subdriver
thinkpad-acpi: enhanced debugging messages for rfkill subdrivers
thinkpad-acpi: restrict access to some firmware LEDs
thinkpad-acpi: remove HKEY disable functionality
thinkpad-acpi: add new debug helpers and warn of deprecated atts
thinkpad-acpi: add missing log levels
thinkpad-acpi: cleanup debug helpers
thinkpad-acpi: documentation cleanup
thinkpad-acpi: drop ibm-acpi alias
...
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); * * RETURN: Status * - * DESCRIPTION: Create the system mutex objects. + * DESCRIPTION: Create the system mutex objects. This includes mutexes, + * spin locks, and reader/writer locks. * ******************************************************************************/ @@ -71,9 +72,8 @@ acpi_status acpi_ut_mutex_initialize(void) ACPI_FUNCTION_TRACE(ut_mutex_initialize); - /* - * Create each of the predefined mutex objects - */ + /* Create each of the predefined mutex objects */ + for (i = 0; i < ACPI_NUM_MUTEX; i++) { status = acpi_ut_create_mutex(i); if (ACPI_FAILURE(status)) { @@ -86,6 +86,9 @@ acpi_status acpi_ut_mutex_initialize(void) spin_lock_init(acpi_gbl_gpe_lock); spin_lock_init(acpi_gbl_hardware_lock); + /* Create the reader/writer lock for namespace access */ + + status = acpi_ut_create_rw_lock(&acpi_gbl_namespace_rw_lock); return_ACPI_STATUS(status); } @@ -97,7 +100,8 @@ acpi_status acpi_ut_mutex_initialize(void) * * RETURN: None. * - * DESCRIPTION: Delete all of the system mutex objects. + * DESCRIPTION: Delete all of the system mutex objects. This includes mutexes, + * spin locks, and reader/writer locks. * ******************************************************************************/ @@ -107,9 +111,8 @@ void acpi_ut_mutex_terminate(void) ACPI_FUNCTION_TRACE(ut_mutex_terminate); - /* - * Delete each predefined mutex object - */ + /* Delete each predefined mutex object */ + for (i = 0; i < ACPI_NUM_MUTEX; i++) { (void)acpi_ut_delete_mutex(i); } @@ -118,6 +121,10 @@ void acpi_ut_mutex_terminate(void) acpi_os_delete_lock(acpi_gbl_gpe_lock); acpi_os_delete_lock(acpi_gbl_hardware_lock); + + /* Delete the reader/writer lock */ + + acpi_ut_delete_rw_lock(&acpi_gbl_namespace_rw_lock); return_VOID; } |