diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-01-13 10:02:15 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-23 17:35:10 -0500 |
commit | 6aa4cdd07139ba4d5b89139b0070d795cc4dea88 (patch) | |
tree | 3bfe5e8ef916f0e27c0ea8ef0d073fcd01cfff29 /drivers/pci/hotplug/acpiphp_glue.c | |
parent | c408a3794d6222ab43ab26648385f850a82f0803 (diff) |
[PATCH] PCI hotplug: convert semaphores to mutex
semaphore to mutex conversion.
the conversion was generated via scripts, and the result was validated
automatically via a script as well.
build tested with allyesconfig.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_glue.c')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 509a5b3ae998..4e25d9c7cc39 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include <linux/kernel.h> | 46 | #include <linux/kernel.h> |
47 | #include <linux/pci.h> | 47 | #include <linux/pci.h> |
48 | #include <linux/smp_lock.h> | 48 | #include <linux/smp_lock.h> |
49 | #include <asm/semaphore.h> | 49 | #include <linux/mutex.h> |
50 | 50 | ||
51 | #include "../pci.h" | 51 | #include "../pci.h" |
52 | #include "pci_hotplug.h" | 52 | #include "pci_hotplug.h" |
@@ -188,7 +188,7 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
188 | slot->device = device; | 188 | slot->device = device; |
189 | slot->sun = sun; | 189 | slot->sun = sun; |
190 | INIT_LIST_HEAD(&slot->funcs); | 190 | INIT_LIST_HEAD(&slot->funcs); |
191 | init_MUTEX(&slot->crit_sect); | 191 | mutex_init(&slot->crit_sect); |
192 | 192 | ||
193 | slot->next = bridge->slots; | 193 | slot->next = bridge->slots; |
194 | bridge->slots = slot; | 194 | bridge->slots = slot; |
@@ -1401,7 +1401,7 @@ int acpiphp_enable_slot(struct acpiphp_slot *slot) | |||
1401 | { | 1401 | { |
1402 | int retval; | 1402 | int retval; |
1403 | 1403 | ||
1404 | down(&slot->crit_sect); | 1404 | mutex_lock(&slot->crit_sect); |
1405 | 1405 | ||
1406 | /* wake up all functions */ | 1406 | /* wake up all functions */ |
1407 | retval = power_on_slot(slot); | 1407 | retval = power_on_slot(slot); |
@@ -1413,7 +1413,7 @@ int acpiphp_enable_slot(struct acpiphp_slot *slot) | |||
1413 | retval = enable_device(slot); | 1413 | retval = enable_device(slot); |
1414 | 1414 | ||
1415 | err_exit: | 1415 | err_exit: |
1416 | up(&slot->crit_sect); | 1416 | mutex_unlock(&slot->crit_sect); |
1417 | return retval; | 1417 | return retval; |
1418 | } | 1418 | } |
1419 | 1419 | ||
@@ -1424,7 +1424,7 @@ int acpiphp_disable_slot(struct acpiphp_slot *slot) | |||
1424 | { | 1424 | { |
1425 | int retval = 0; | 1425 | int retval = 0; |
1426 | 1426 | ||
1427 | down(&slot->crit_sect); | 1427 | mutex_lock(&slot->crit_sect); |
1428 | 1428 | ||
1429 | /* unconfigure all functions */ | 1429 | /* unconfigure all functions */ |
1430 | retval = disable_device(slot); | 1430 | retval = disable_device(slot); |
@@ -1437,7 +1437,7 @@ int acpiphp_disable_slot(struct acpiphp_slot *slot) | |||
1437 | goto err_exit; | 1437 | goto err_exit; |
1438 | 1438 | ||
1439 | err_exit: | 1439 | err_exit: |
1440 | up(&slot->crit_sect); | 1440 | mutex_unlock(&slot->crit_sect); |
1441 | return retval; | 1441 | return retval; |
1442 | } | 1442 | } |
1443 | 1443 | ||