diff options
Diffstat (limited to 'drivers/usb/core/message.c')
-rw-r--r-- | drivers/usb/core/message.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index dea55914d641..2184ef40a82a 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
@@ -122,12 +122,11 @@ static int usb_internal_control_msg(struct usb_device *usb_dev, | |||
122 | * This function sends a simple control message to a specified endpoint and | 122 | * This function sends a simple control message to a specified endpoint and |
123 | * waits for the message to complete, or timeout. | 123 | * waits for the message to complete, or timeout. |
124 | * | 124 | * |
125 | * Don't use this function from within an interrupt context, like a bottom half | 125 | * Don't use this function from within an interrupt context. If you need |
126 | * handler. If you need an asynchronous message, or need to send a message | 126 | * an asynchronous message, or need to send a message from within interrupt |
127 | * from within interrupt context, use usb_submit_urb(). | 127 | * context, use usb_submit_urb(). If a thread in your driver uses this call, |
128 | * If a thread in your driver uses this call, make sure your disconnect() | 128 | * make sure your disconnect() method can wait for it to complete. Since you |
129 | * method can wait for it to complete. Since you don't have a handle on the | 129 | * don't have a handle on the URB used, you can't cancel the request. |
130 | * URB used, you can't cancel the request. | ||
131 | * | 130 | * |
132 | * Return: If successful, the number of bytes transferred. Otherwise, a negative | 131 | * Return: If successful, the number of bytes transferred. Otherwise, a negative |
133 | * error number. | 132 | * error number. |
@@ -173,12 +172,11 @@ EXPORT_SYMBOL_GPL(usb_control_msg); | |||
173 | * This function sends a simple interrupt message to a specified endpoint and | 172 | * This function sends a simple interrupt message to a specified endpoint and |
174 | * waits for the message to complete, or timeout. | 173 | * waits for the message to complete, or timeout. |
175 | * | 174 | * |
176 | * Don't use this function from within an interrupt context, like a bottom half | 175 | * Don't use this function from within an interrupt context. If you need |
177 | * handler. If you need an asynchronous message, or need to send a message | 176 | * an asynchronous message, or need to send a message from within interrupt |
178 | * from within interrupt context, use usb_submit_urb() If a thread in your | 177 | * context, use usb_submit_urb() If a thread in your driver uses this call, |
179 | * driver uses this call, make sure your disconnect() method can wait for it to | 178 | * make sure your disconnect() method can wait for it to complete. Since you |
180 | * complete. Since you don't have a handle on the URB used, you can't cancel | 179 | * don't have a handle on the URB used, you can't cancel the request. |
181 | * the request. | ||
182 | * | 180 | * |
183 | * Return: | 181 | * Return: |
184 | * If successful, 0. Otherwise a negative error number. The number of actual | 182 | * If successful, 0. Otherwise a negative error number. The number of actual |
@@ -207,12 +205,11 @@ EXPORT_SYMBOL_GPL(usb_interrupt_msg); | |||
207 | * This function sends a simple bulk message to a specified endpoint | 205 | * This function sends a simple bulk message to a specified endpoint |
208 | * and waits for the message to complete, or timeout. | 206 | * and waits for the message to complete, or timeout. |
209 | * | 207 | * |
210 | * Don't use this function from within an interrupt context, like a bottom half | 208 | * Don't use this function from within an interrupt context. If you need |
211 | * handler. If you need an asynchronous message, or need to send a message | 209 | * an asynchronous message, or need to send a message from within interrupt |
212 | * from within interrupt context, use usb_submit_urb() If a thread in your | 210 | * context, use usb_submit_urb() If a thread in your driver uses this call, |
213 | * driver uses this call, make sure your disconnect() method can wait for it to | 211 | * make sure your disconnect() method can wait for it to complete. Since you |
214 | * complete. Since you don't have a handle on the URB used, you can't cancel | 212 | * don't have a handle on the URB used, you can't cancel the request. |
215 | * the request. | ||
216 | * | 213 | * |
217 | * Because there is no usb_interrupt_msg() and no USBDEVFS_INTERRUPT ioctl, | 214 | * Because there is no usb_interrupt_msg() and no USBDEVFS_INTERRUPT ioctl, |
218 | * users are forced to abuse this routine by using it to submit URBs for | 215 | * users are forced to abuse this routine by using it to submit URBs for |