]> err.no Git - linux-2.6/blobdiff - drivers/usb/gadget/dummy_hcd.c
USB: gadget: dummy_hcd.c: fix nested switch statements
[linux-2.6] / drivers / usb / gadget / dummy_hcd.c
index cbe44535c0f0a4520af8b004ff84bad0264e1008..433f8c47cce5936607f18170754ef4f55e740fd9 100644 (file)
@@ -365,16 +365,14 @@ dummy_enable (struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
                case USB_SPEED_HIGH:
                        if (max == 512)
                                break;
-                       /* conserve return statements */
-               default:
-                       switch (max) {
-                       case 8: case 16: case 32: case 64:
+                       goto done;
+               case USB_SPEED_FULL:
+                       if (max == 8 || max == 16 || max == 32 || max == 64)
                                /* we'll fake any legal size */
                                break;
-                       default:
-               case USB_SPEED_LOW:
-                               goto done;
-                       }
+                       /* save a return statement */
+               default:
+                       goto done;
                }
                break;
        case USB_ENDPOINT_XFER_INT:
@@ -900,7 +898,6 @@ static int dummy_udc_suspend (struct platform_device *pdev, pm_message_t state)
        set_link_state (dum);
        spin_unlock_irq (&dum->lock);
 
-       pdev->dev.power.power_state = state;
        usb_hcd_poll_rh_status (dummy_to_hcd (dum));
        return 0;
 }
@@ -915,7 +912,6 @@ static int dummy_udc_resume (struct platform_device *pdev)
        set_link_state (dum);
        spin_unlock_irq (&dum->lock);
 
-       pdev->dev.power.power_state = PMSG_ON;
        usb_hcd_poll_rh_status (dummy_to_hcd (dum));
        return 0;
 }