usb: musb: don't allow gadget suspend in host mode too
authorGrazvydas Ignotas <notasas@gmail.com>
Wed, 27 Feb 2013 22:30:24 +0000 (00:30 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Tue, 12 Mar 2013 21:45:59 +0000 (23:45 +0200)
bad things happen, so better ask for gadget removal which doesn't
at least break everything in host mode.

drivers/usb/musb/musb_core.c

index 421ee5f..53d668e 100644 (file)
@@ -2366,7 +2366,7 @@ static int musb_suspend(struct device *dev)
 
        spin_lock_irqsave(&musb->lock, flags);
 
-       if (is_peripheral_active(musb)) {
+       {
                /* FIXME force disconnect unless we know USB will wake
                 * the system up quickly enough to respond ...
                 */
@@ -2384,10 +2384,6 @@ static int musb_suspend(struct device *dev)
                                pm_usage_count);
                        ret = -EBUSY;
                }
-       } else if (is_host_active(musb)) {
-               /* we know all the children are suspended; sometimes
-                * they will even be wakeup-enabled.
-                */
        }
 
        spin_unlock_irqrestore(&musb->lock, flags);