usbnet: remove declaration for intr_complete
authortom.leiming@gmail.com <tom.leiming@gmail.com>
Mon, 11 Jun 2012 15:19:44 +0000 (15:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Jun 2012 01:51:08 +0000 (18:51 -0700)
Remove declaration for intr_complete so that ctags may be happy to
decrease duplicated symbols, also decrease one line code.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/usbnet.c

index 022c1e72d00444c9860b37a3919127b738407b0b..205247efee62d1f75abb945f19007d64090f72b7 100644 (file)
@@ -180,7 +180,41 @@ int usbnet_get_ethernet_addr(struct usbnet *dev, int iMACAddress)
 }
 EXPORT_SYMBOL_GPL(usbnet_get_ethernet_addr);
 
-static void intr_complete (struct urb *urb);
+static void intr_complete (struct urb *urb)
+{
+       struct usbnet   *dev = urb->context;
+       int             status = urb->status;
+
+       switch (status) {
+       /* success */
+       case 0:
+               dev->driver_info->status(dev, urb);
+               break;
+
+       /* software-driven interface shutdown */
+       case -ENOENT:           /* urb killed */
+       case -ESHUTDOWN:        /* hardware gone */
+               netif_dbg(dev, ifdown, dev->net,
+                         "intr shutdown, code %d\n", status);
+               return;
+
+       /* NOTE:  not throttling like RX/TX, since this endpoint
+        * already polls infrequently
+        */
+       default:
+               netdev_dbg(dev->net, "intr status %d\n", status);
+               break;
+       }
+
+       if (!netif_running (dev->net))
+               return;
+
+       memset(urb->transfer_buffer, 0, urb->transfer_buffer_length);
+       status = usb_submit_urb (urb, GFP_ATOMIC);
+       if (status != 0)
+               netif_err(dev, timer, dev->net,
+                         "intr resubmit --> %d\n", status);
+}
 
 static int init_status (struct usbnet *dev, struct usb_interface *intf)
 {
@@ -519,42 +553,6 @@ block:
        netif_dbg(dev, rx_err, dev->net, "no read resubmitted\n");
 }
 
-static void intr_complete (struct urb *urb)
-{
-       struct usbnet   *dev = urb->context;
-       int             status = urb->status;
-
-       switch (status) {
-       /* success */
-       case 0:
-               dev->driver_info->status(dev, urb);
-               break;
-
-       /* software-driven interface shutdown */
-       case -ENOENT:           /* urb killed */
-       case -ESHUTDOWN:        /* hardware gone */
-               netif_dbg(dev, ifdown, dev->net,
-                         "intr shutdown, code %d\n", status);
-               return;
-
-       /* NOTE:  not throttling like RX/TX, since this endpoint
-        * already polls infrequently
-        */
-       default:
-               netdev_dbg(dev->net, "intr status %d\n", status);
-               break;
-       }
-
-       if (!netif_running (dev->net))
-               return;
-
-       memset(urb->transfer_buffer, 0, urb->transfer_buffer_length);
-       status = usb_submit_urb (urb, GFP_ATOMIC);
-       if (status != 0)
-               netif_err(dev, timer, dev->net,
-                         "intr resubmit --> %d\n", status);
-}
-
 /*-------------------------------------------------------------------------*/
 void usbnet_pause_rx(struct usbnet *dev)
 {