]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
USB: change interface to usb_lock_device_for_reset()
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 4 Nov 2008 16:29:27 +0000 (11:29 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 7 Jan 2009 17:59:52 +0000 (09:59 -0800)
commit011b15df465745474e3ec85482633685933ed5a7
tree97df5cb516672f0a6fae5b993840beb667c76bd0
parent857cc4dfb6420ec0a67b3cda559aaa7c429ddce7
USB: change interface to usb_lock_device_for_reset()

This patch (as1161) changes the interface to
usb_lock_device_for_reset().  The existing interface is apparently not
very clear, judging from the fact that several of its callers don't
use it correctly.  The new interface always returns 0 for success and
it always requires the caller to unlock the device afterward.

The new routine will not return immediately if it is called while the
driver's probe method is running.  Instead it will wait until the
probe is over and the device has been unlocked.  This shouldn't cause
any problems; I don't know of any cases where drivers call
usb_lock_device_for_reset() during probe.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/block/ub.c
drivers/hid/usbhid/hid-core.c
drivers/media/video/pvrusb2/pvrusb2-hdw.c
drivers/usb/core/usb.c
drivers/usb/image/microtek.c
drivers/usb/storage/transport.c