ChangeSet 1.1832.55.7, 2004/09/03 13:25:50+02:00, [EMAIL PROTECTED] [PATCH] USB: Make usbcore use usb_kill_urb()
This patch changes the only places in usbcore where usb_unlink_urb() is still used for synchronous unlinking; now they will use usb_kill_urb(). As it turns out, there were only a couple of changes needed. This still leaves all the drivers to audit! Signed-off-by: Alan Stern <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> drivers/usb/core/devio.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c --- a/drivers/usb/core/devio.c 2004-10-19 08:19:47 -07:00 +++ b/drivers/usb/core/devio.c 2004-10-19 08:19:47 -07:00 @@ -286,9 +286,10 @@ while (!list_empty(list)) { as = list_entry(list->next, struct async, asynclist); list_del_init(&as->asynclist); + + /* drop the spinlock so the completion handler can run */ spin_unlock_irqrestore(&ps->lock, flags); - /* usb_unlink_urb calls the completion handler with status == -ENOENT */ - usb_unlink_urb(as->urb); + usb_kill_urb(as->urb); spin_lock_irqsave(&ps->lock, flags); } spin_unlock_irqrestore(&ps->lock, flags); @@ -976,7 +977,7 @@ as = async_getpending(ps, arg); if (!as) return -EINVAL; - usb_unlink_urb(as->urb); + usb_kill_urb(as->urb); return 0; } ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel