summaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug/pciehp_core.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-13 16:02:15 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-23 14:35:10 -0800
commit6aa4cdd07139ba4d5b89139b0070d795cc4dea88 (patch)
tree3bfe5e8ef916f0e27c0ea8ef0d073fcd01cfff29 /drivers/pci/hotplug/pciehp_core.c
parentc408a3794d6222ab43ab26648385f850a82f0803 (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/pciehp_core.c')
-rw-r--r--drivers/pci/hotplug/pciehp_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index 4fb569018a24..1e8506e0fd87 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -439,7 +439,7 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
}
/* Wait for exclusive access to hardware */
- down(&ctrl->crit_sect);
+ mutex_lock(&ctrl->crit_sect);
t_slot->hpc_ops->get_adapter_status(t_slot, &value); /* Check if slot is occupied */
@@ -447,7 +447,7 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
rc = t_slot->hpc_ops->power_off_slot(t_slot); /* Power off slot if not occupied*/
if (rc) {
/* Done with exclusive hardware access */
- up(&ctrl->crit_sect);
+ mutex_unlock(&ctrl->crit_sect);
goto err_out_free_ctrl_slot;
} else
/* Wait for the command to complete */
@@ -455,7 +455,7 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
}
/* Done with exclusive hardware access */
- up(&ctrl->crit_sect);
+ mutex_unlock(&ctrl->crit_sect);
return 0;