summaryrefslogtreecommitdiff
path: root/include/linux/usb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 49ab8dbb885f..825f03b29067 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -1369,8 +1369,10 @@ extern void usb_deregister(struct usb_driver *);
module_driver(__usb_driver, usb_register, \
usb_deregister)
-extern int usb_register_device_driver(struct usb_device_driver *,
- struct module *);
+#define usb_register_device_driver(new_udriver) \
+ __usb_register_device_driver(new_udriver, THIS_MODULE, KBUILD_MODNAME)
+extern int __usb_register_device_driver(struct usb_device_driver *,
+ struct module *, const char *);
extern void usb_deregister_device_driver(struct usb_device_driver *);
extern int usb_register_dev(struct usb_interface *intf,
@@ -1606,7 +1608,12 @@ typedef void (*usb_complete_t)(struct urb *);
*
* Completion Callbacks:
*
- * The completion callback is made in_interrupt(), and one of the first
+ * The completion callback can occur in any context: process, interrupt,
+ * BH, or anything else. Also, interrupts may or may not be disabled on
+ * the local CPU when the callback runs. A completion handler routine
+ * must not depend on any particular properties of its environment.
+ *
+ * One of the first
* things that a completion handler should do is check the status field.
* The status field is provided for all URBs. It is used to report
* unlinked URBs, and status for all non-ISO transfers. It should not