From: Johan Hovold Date: Mon, 26 May 2014 17:22:54 +0000 (+0200) Subject: USB: sierra: fix remote wakeup X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~34^2~137 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80cc0fcbdaeaf10d04ba27779a2d7ceb73d2717a;p=pandora-kernel.git USB: sierra: fix remote wakeup Make sure that needs_remote_wake up is always set when there are open ports. Currently close() would unconditionally set needs_remote_wakeup to 0 even though there might still be open ports. This could lead to blocked input and possibly dropped data on devices that do not support remote wakeup (and which must therefore not be runtime suspended while open). Add an open_ports counter (protected by the susp_lock) and only clear needs_remote_wakeup when the last port is closed. Fixes: e6929a9020ac ("USB: support for autosuspend in sierra while online") Cc: # v2.6.32 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed