aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/atm/cxacru.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-01-13 09:52:55 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-31 20:23:40 -0500
commitab3c81ff639fbee4ab32af84c809d283b773084a (patch)
tree6981ca653daa753d2a6d0bbebd4a62b1755d91ef /drivers/usb/atm/cxacru.c
parenta3673d3cd1cdeec6b503ffa418ca2d5aeff82fd7 (diff)
[PATCH] USBATM: semaphore to mutex conversion
This is the usbatm part of the Arjan, Jes and Ingo mass semaphore to mutex conversion, reworked to apply on top of the patches I just sent to you. This time, with correct attribution and signed-off lines. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Duncan Sands <baldrick@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/atm/cxacru.c')
-rw-r--r--drivers/usb/atm/cxacru.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index 70a96e98152c..04631dcbabbc 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -36,6 +36,7 @@
36#include <linux/init.h> 36#include <linux/init.h>
37#include <linux/device.h> /* FIXME: linux/firmware.h should include it itself */ 37#include <linux/device.h> /* FIXME: linux/firmware.h should include it itself */
38#include <linux/firmware.h> 38#include <linux/firmware.h>
39#include <linux/mutex.h>
39 40
40#include "usbatm.h" 41#include "usbatm.h"
41 42
@@ -160,7 +161,7 @@ struct cxacru_data {
160 struct work_struct poll_work; 161 struct work_struct poll_work;
161 162
162 /* contol handles */ 163 /* contol handles */
163 struct semaphore cm_serialize; 164 struct mutex cm_serialize;
164 u8 *rcv_buf; 165 u8 *rcv_buf;
165 u8 *snd_buf; 166 u8 *snd_buf;
166 struct urb *rcv_urb; 167 struct urb *rcv_urb;
@@ -219,7 +220,7 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
219 goto fail; 220 goto fail;
220 } 221 }
221 222
222 down(&instance->cm_serialize); 223 mutex_lock(&instance->cm_serialize);
223 224
224 /* submit reading urb before the writing one */ 225 /* submit reading urb before the writing one */
225 init_completion(&instance->rcv_done); 226 init_completion(&instance->rcv_done);
@@ -288,7 +289,7 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
288 ret = offd; 289 ret = offd;
289 dbg("cm %#x", cm); 290 dbg("cm %#x", cm);
290fail: 291fail:
291 up(&instance->cm_serialize); 292 mutex_unlock(&instance->cm_serialize);
292 return ret; 293 return ret;
293} 294}
294 295
@@ -717,7 +718,7 @@ static int cxacru_bind(struct usbatm_data *usbatm_instance,
717 instance->snd_buf, PAGE_SIZE, 718 instance->snd_buf, PAGE_SIZE,
718 cxacru_blocking_completion, &instance->snd_done, 4); 719 cxacru_blocking_completion, &instance->snd_done, 4);
719 720
720 init_MUTEX(&instance->cm_serialize); 721 mutex_init(&instance->cm_serialize);
721 722
722 INIT_WORK(&instance->poll_work, (void *)cxacru_poll_status, instance); 723 INIT_WORK(&instance->poll_work, (void *)cxacru_poll_status, instance);
723 724