diff options
Diffstat (limited to 'drivers/usb/atm/cxacru.c')
-rw-r--r-- | drivers/usb/atm/cxacru.c | 9 |
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); |
290 | fail: | 291 | fail: |
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 | ||