aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2008-06-18 10:00:29 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-21 18:16:33 -0400
commit742120c63138651c898614001cb58cd607401eac (patch)
tree3aeeb95b66773ee60839c651a10d295117d87e88 /include/linux/usb.h
parentdd9ca5d9be7eba99d685d733e23d5be7110e9556 (diff)
USB: fix usb_reset_device and usb_reset_composite_device(take 3)
This patch renames the existing usb_reset_device in hub.c to usb_reset_and_verify_device and renames the existing usb_reset_composite_device to usb_reset_device. Also the new usb_reset_and_verify_device does't need to be EXPORTED . The idea of the patch is that external interface driver should warn the other interfaces' driver of the same device before and after reseting the usb device. One interface driver shoud call _old_ usb_reset_composite_device instead of _old_ usb_reset_device since it can't assume the device contains only one interface. The _old_ usb_reset_composite_device is safe for single interface device also. we rename the two functions to make the change easily. This patch is under guideline from Alan Stern. Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index c74cc64bddc8..3cc8db5254d1 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -497,7 +497,6 @@ extern int usb_lock_device_for_reset(struct usb_device *udev,
497 497
498/* USB port reset for device reinitialization */ 498/* USB port reset for device reinitialization */
499extern int usb_reset_device(struct usb_device *dev); 499extern int usb_reset_device(struct usb_device *dev);
500extern int usb_reset_composite_device(struct usb_device *dev);
501 500
502extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id); 501extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);
503 502
@@ -957,9 +956,9 @@ struct usbdrv_wrap {
957 * @resume: Called when the device is being resumed by the system. 956 * @resume: Called when the device is being resumed by the system.
958 * @reset_resume: Called when the suspended device has been reset instead 957 * @reset_resume: Called when the suspended device has been reset instead
959 * of being resumed. 958 * of being resumed.
960 * @pre_reset: Called by usb_reset_composite_device() when the device 959 * @pre_reset: Called by usb_reset_device() when the device
961 * is about to be reset. 960 * is about to be reset.
962 * @post_reset: Called by usb_reset_composite_device() after the device 961 * @post_reset: Called by usb_reset_device() after the device
963 * has been reset 962 * has been reset
964 * @id_table: USB drivers use ID table to support hotplugging. 963 * @id_table: USB drivers use ID table to support hotplugging.
965 * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set 964 * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set