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/ibmphp_hpc.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/ibmphp_hpc.c')
-rw-r--r-- | drivers/pci/hotplug/ibmphp_hpc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/pci/hotplug/ibmphp_hpc.c b/drivers/pci/hotplug/ibmphp_hpc.c index 1a3eb8d3d4cb..d680bb472c7b 100644 --- a/drivers/pci/hotplug/ibmphp_hpc.c +++ b/drivers/pci/hotplug/ibmphp_hpc.c | |||
@@ -34,6 +34,8 @@ | |||
34 | #include <linux/pci.h> | 34 | #include <linux/pci.h> |
35 | #include <linux/smp_lock.h> | 35 | #include <linux/smp_lock.h> |
36 | #include <linux/init.h> | 36 | #include <linux/init.h> |
37 | #include <linux/mutex.h> | ||
38 | |||
37 | #include "ibmphp.h" | 39 | #include "ibmphp.h" |
38 | 40 | ||
39 | static int to_debug = FALSE; | 41 | static int to_debug = FALSE; |
@@ -101,7 +103,7 @@ static int to_debug = FALSE; | |||
101 | //---------------------------------------------------------------------------- | 103 | //---------------------------------------------------------------------------- |
102 | static int ibmphp_shutdown; | 104 | static int ibmphp_shutdown; |
103 | static int tid_poll; | 105 | static int tid_poll; |
104 | static struct semaphore sem_hpcaccess; // lock access to HPC | 106 | static struct mutex sem_hpcaccess; // lock access to HPC |
105 | static struct semaphore semOperations; // lock all operations and | 107 | static struct semaphore semOperations; // lock all operations and |
106 | // access to data structures | 108 | // access to data structures |
107 | static struct semaphore sem_exit; // make sure polling thread goes away | 109 | static struct semaphore sem_exit; // make sure polling thread goes away |
@@ -131,7 +133,7 @@ void __init ibmphp_hpc_initvars (void) | |||
131 | { | 133 | { |
132 | debug ("%s - Entry\n", __FUNCTION__); | 134 | debug ("%s - Entry\n", __FUNCTION__); |
133 | 135 | ||
134 | init_MUTEX (&sem_hpcaccess); | 136 | mutex_init(&sem_hpcaccess); |
135 | init_MUTEX (&semOperations); | 137 | init_MUTEX (&semOperations); |
136 | init_MUTEX_LOCKED (&sem_exit); | 138 | init_MUTEX_LOCKED (&sem_exit); |
137 | to_debug = FALSE; | 139 | to_debug = FALSE; |
@@ -778,7 +780,7 @@ int ibmphp_hpc_writeslot (struct slot * pslot, u8 cmd) | |||
778 | *---------------------------------------------------------------------*/ | 780 | *---------------------------------------------------------------------*/ |
779 | static void get_hpc_access (void) | 781 | static void get_hpc_access (void) |
780 | { | 782 | { |
781 | down (&sem_hpcaccess); | 783 | mutex_lock(&sem_hpcaccess); |
782 | } | 784 | } |
783 | 785 | ||
784 | /*---------------------------------------------------------------------- | 786 | /*---------------------------------------------------------------------- |
@@ -786,7 +788,7 @@ static void get_hpc_access (void) | |||
786 | *---------------------------------------------------------------------*/ | 788 | *---------------------------------------------------------------------*/ |
787 | void free_hpc_access (void) | 789 | void free_hpc_access (void) |
788 | { | 790 | { |
789 | up (&sem_hpcaccess); | 791 | mutex_unlock(&sem_hpcaccess); |
790 | } | 792 | } |
791 | 793 | ||
792 | /*---------------------------------------------------------------------- | 794 | /*---------------------------------------------------------------------- |