|
@@ -39,6 +39,8 @@ int tm6000_read_write_usb(struct tm6000_core *dev, u8 req_type, u8 req,
|
|
|
unsigned int pipe;
|
|
|
u8 *data = NULL;
|
|
|
|
|
|
+ mutex_lock(&dev->usb_lock);
|
|
|
+
|
|
|
if (len)
|
|
|
data = kzalloc(len, GFP_KERNEL);
|
|
|
|
|
@@ -86,9 +88,9 @@ int tm6000_read_write_usb(struct tm6000_core *dev, u8 req_type, u8 req,
|
|
|
}
|
|
|
|
|
|
kfree(data);
|
|
|
-
|
|
|
msleep(5);
|
|
|
|
|
|
+ mutex_unlock(&dev->usb_lock);
|
|
|
return ret;
|
|
|
}
|
|
|
|