staging: usbip: removed #if 0'd out code
authorBart Westgeest <bart@elbrys.com>
Mon, 23 Jan 2012 15:55:47 +0000 (10:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2012 17:42:23 +0000 (09:42 -0800)
Signed-off-by: Bart Westgeest <bart@elbrys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/usbip/stub_rx.c
drivers/staging/usbip/vhci_hcd.c

index 27ac363d1cfa2f283b0c422bcb92ca3258cd74cf..1d5b3fc62160ff95afddba819e9b91eb2cad26a0 100644 (file)
@@ -367,15 +367,6 @@ static int get_pipe(struct stub_device *sdev, int epnum, int dir)
        }
 
        epd = &ep->desc;
-#if 0
-       /* epnum 0 is always control */
-       if (epnum == 0) {
-               if (dir == USBIP_DIR_OUT)
-                       return usb_sndctrlpipe(udev, 0);
-               else
-                       return usb_rcvctrlpipe(udev, 0);
-       }
-#endif
        if (usb_endpoint_xfer_control(epd)) {
                if (dir == USBIP_DIR_OUT)
                        return usb_sndctrlpipe(udev, epnum);
index 2ee97e2095b0ad9bf6b4e07a8d27ff2b161c1e17..8d96ab065cb75d1376104f113c828266b17b1c72 100644 (file)
@@ -386,29 +386,6 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
                                dum->port_status[rhport] |=
                                        USB_PORT_STAT_ENABLE;
                        }
-#if 0
-                       if (dum->driver) {
-                               dum->port_status[rhport] |=
-                                       USB_PORT_STAT_ENABLE;
-                               /* give it the best speed we agree on */
-                               dum->gadget.speed = dum->driver->speed;
-                               dum->gadget.ep0->maxpacket = 64;
-                               switch (dum->gadget.speed) {
-                               case USB_SPEED_HIGH:
-                                       dum->port_status[rhport] |=
-                                               USB_PORT_STAT_HIGH_SPEED;
-                                       break;
-                               case USB_SPEED_LOW:
-                                       dum->gadget.ep0->maxpacket = 8;
-                                       dum->port_status[rhport] |=
-                                               USB_PORT_STAT_LOW_SPEED;
-                                       break;
-                               default:
-                                       dum->gadget.speed = USB_SPEED_FULL;
-                                       break;
-                               }
-                       }
-#endif
                }
                ((u16 *) buf)[0] = cpu_to_le16(dum->port_status[rhport]);
                ((u16 *) buf)[1] = cpu_to_le16(dum->port_status[rhport] >> 16);
@@ -425,15 +402,6 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
                case USB_PORT_FEAT_SUSPEND:
                        usbip_dbg_vhci_rh(" SetPortFeature: "
                                          "USB_PORT_FEAT_SUSPEND\n");
-#if 0
-                       dum->port_status[rhport] |=
-                               (1 << USB_PORT_FEAT_SUSPEND);
-                       if (dum->driver->suspend) {
-                               spin_unlock(&dum->lock);
-                               dum->driver->suspend(&dum->gadget);
-                               spin_lock(&dum->lock);
-                       }
-#endif
                        break;
                case USB_PORT_FEAT_RESET:
                        usbip_dbg_vhci_rh(" SetPortFeature: "
@@ -444,13 +412,6 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
                                        ~(USB_PORT_STAT_ENABLE |
                                          USB_PORT_STAT_LOW_SPEED |
                                          USB_PORT_STAT_HIGH_SPEED);
-#if 0
-                               if (dum->driver) {
-                                       dev_dbg(hardware, "disconnect\n");
-                                       stop_activity(dum, dum->driver);
-                               }
-#endif
-
                                /* FIXME test that code path! */
                        }
                        /* 50msec reset signaling */