aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authortom.leiming@gmail.com <tom.leiming@gmail.com>2012-06-11 11:19:44 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-12 21:51:08 -0400
commit24ead29915352d4689a5972c65307a073b229fb4 (patch)
tree450399ba82088f518cd7be3dbd807396e24223dc /drivers/net/usb
parent4a5a14d39e8164b5c77f1bf42851a58a69a6c7b2 (diff)
usbnet: remove declaration for intr_complete
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>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/usbnet.c72
1 files changed, 35 insertions, 37 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 022c1e72d004..205247efee62 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -180,7 +180,41 @@ int usbnet_get_ethernet_addr(struct usbnet *dev, int iMACAddress)
180} 180}
181EXPORT_SYMBOL_GPL(usbnet_get_ethernet_addr); 181EXPORT_SYMBOL_GPL(usbnet_get_ethernet_addr);
182 182
183static void intr_complete (struct urb *urb); 183static void intr_complete (struct urb *urb)
184{
185 struct usbnet *dev = urb->context;
186 int status = urb->status;
187
188 switch (status) {
189 /* success */
190 case 0:
191 dev->driver_info->status(dev, urb);
192 break;
193
194 /* software-driven interface shutdown */
195 case -ENOENT: /* urb killed */
196 case -ESHUTDOWN: /* hardware gone */
197 netif_dbg(dev, ifdown, dev->net,
198 "intr shutdown, code %d\n", status);
199 return;
200
201 /* NOTE: not throttling like RX/TX, since this endpoint
202 * already polls infrequently
203 */
204 default:
205 netdev_dbg(dev->net, "intr status %d\n", status);
206 break;
207 }
208
209 if (!netif_running (dev->net))
210 return;
211
212 memset(urb->transfer_buffer, 0, urb->transfer_buffer_length);
213 status = usb_submit_urb (urb, GFP_ATOMIC);
214 if (status != 0)
215 netif_err(dev, timer, dev->net,
216 "intr resubmit --> %d\n", status);
217}
184 218
185static int init_status (struct usbnet *dev, struct usb_interface *intf) 219static int init_status (struct usbnet *dev, struct usb_interface *intf)
186{ 220{
@@ -519,42 +553,6 @@ block:
519 netif_dbg(dev, rx_err, dev->net, "no read resubmitted\n"); 553 netif_dbg(dev, rx_err, dev->net, "no read resubmitted\n");
520} 554}
521 555
522static void intr_complete (struct urb *urb)
523{
524 struct usbnet *dev = urb->context;
525 int status = urb->status;
526
527 switch (status) {
528 /* success */
529 case 0:
530 dev->driver_info->status(dev, urb);
531 break;
532
533 /* software-driven interface shutdown */
534 case -ENOENT: /* urb killed */
535 case -ESHUTDOWN: /* hardware gone */
536 netif_dbg(dev, ifdown, dev->net,
537 "intr shutdown, code %d\n", status);
538 return;
539
540 /* NOTE: not throttling like RX/TX, since this endpoint
541 * already polls infrequently
542 */
543 default:
544 netdev_dbg(dev->net, "intr status %d\n", status);
545 break;
546 }
547
548 if (!netif_running (dev->net))
549 return;
550
551 memset(urb->transfer_buffer, 0, urb->transfer_buffer_length);
552 status = usb_submit_urb (urb, GFP_ATOMIC);
553 if (status != 0)
554 netif_err(dev, timer, dev->net,
555 "intr resubmit --> %d\n", status);
556}
557
558/*-------------------------------------------------------------------------*/ 556/*-------------------------------------------------------------------------*/
559void usbnet_pause_rx(struct usbnet *dev) 557void usbnet_pause_rx(struct usbnet *dev)
560{ 558{