]> err.no Git - linux-2.6/blobdiff - drivers/usb/host/sl811-hcd.c
PM: USB HCDs use PM_EVENT_PRETHAW
[linux-2.6] / drivers / usb / host / sl811-hcd.c
index fa34092bbcde1e82ac9338d7a2366aea48c2e1d3..9de115d9db2703bad97f57506cf3a9d55d9a106c 100644 (file)
@@ -1783,10 +1783,15 @@ sl811h_suspend(struct platform_device *dev, pm_message_t state)
        struct sl811    *sl811 = hcd_to_sl811(hcd);
        int             retval = 0;
 
-       if (state.event == PM_EVENT_FREEZE)
+       switch (state.event) {
+       case PM_EVENT_FREEZE:
                retval = sl811h_bus_suspend(hcd);
-       else if (state.event == PM_EVENT_SUSPEND)
+               break;
+       case PM_EVENT_SUSPEND:
+       case PM_EVENT_PRETHAW:          /* explicitly discard hw state */
                port_power(sl811, 0);
+               break;
+       }
        if (retval == 0)
                dev->dev.power.power_state = state;
        return retval;