From 78005c5b2e5682cec16aeb5f94f478e115dde4f5 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 24 Nov 2013 20:01:24 +0100 Subject: [PATCH] backports: remove usb_unlink_anchored_urbs() kref_get_unless_zero() was never called by any code. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/usb.h | 2 -- backport/compat/compat-2.6.36.c | 23 ----------------------- 2 files changed, 25 deletions(-) diff --git a/backport/backport-include/linux/usb.h b/backport/backport-include/linux/usb.h index 70d89b815e18..a5c2f2bc29e8 100644 --- a/backport/backport-include/linux/usb.h +++ b/backport/backport-include/linux/usb.h @@ -57,9 +57,7 @@ #ifdef CPTCFG_BACKPORT_OPTION_USB_URB_THREAD_FIX #define usb_scuttle_anchored_urbs LINUX_BACKPORT(usb_scuttle_anchored_urbs) #define usb_get_from_anchor LINUX_BACKPORT(usb_get_from_anchor) -#define usb_unlink_anchored_urbs LINUX_BACKPORT(usb_unlink_anchored_urbs) -extern void usb_unlink_anchored_urbs(struct usb_anchor *anchor); extern struct urb *usb_get_from_anchor(struct usb_anchor *anchor); extern void usb_scuttle_anchored_urbs(struct usb_anchor *anchor); #endif diff --git a/backport/compat/compat-2.6.36.c b/backport/compat/compat-2.6.36.c index ea6443d333b6..331e99165950 100644 --- a/backport/compat/compat-2.6.36.c +++ b/backport/compat/compat-2.6.36.c @@ -22,29 +22,6 @@ static void __usb_unanchor_urb(struct urb *urb, struct usb_anchor *anchor) wake_up(&anchor->wait); } -/** - * usb_unlink_anchored_urbs - asynchronously cancel transfer requests en masse - * @anchor: anchor the requests are bound to - * - * this allows all outstanding URBs to be unlinked starting - * from the back of the queue. This function is asynchronous. - * The unlinking is just tiggered. It may happen after this - * function has returned. - * - * This routine should not be called by a driver after its disconnect - * method has returned. - */ -void usb_unlink_anchored_urbs(struct usb_anchor *anchor) -{ - struct urb *victim; - - while ((victim = usb_get_from_anchor(anchor)) != NULL) { - usb_unlink_urb(victim); - usb_put_urb(victim); - } -} -EXPORT_SYMBOL_GPL(usb_unlink_anchored_urbs); - /** * usb_get_from_anchor - get an anchor's oldest urb * @anchor: the anchor whose urb you want -- 2.30.2