usb: don't check pm qos NO_POWER_OFF flag in usb_port_suspend()
authorLan Tianyu <tianyu.lan@intel.com>
Wed, 3 Jul 2013 14:17:54 +0000 (22:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Sep 2013 00:21:42 +0000 (17:21 -0700)
commit4d425b4eb684168380ab3fc959b2c418c0c3d44d
treededc5482c6625b92615bbc0bf10d1022a6393444
parentee04f90d8a21f96edd0c2207e2b1040874307fd6
usb: don't check pm qos NO_POWER_OFF flag in usb_port_suspend()

commit 98a4f1ff7bea8002ab79d6776e30d27932e88244 upstream.

The pm qos NO_POWER_OFF flag is checked twice during usb device suspend
to see if the usb port power off condition is met. This is redundant and
also will prevent the port from being powered off if the NO_POWER_OFF
flag is changed to 1 from 0 after the device was already suspended.

More detail in the following link.
http://marc.info/?l=linux-usb&m=136543949130865&w=2

This patch should be backported to kernels as old as 3.7, that
contain the commit f7ac7787ad361e31a7972e2854ed8dc2eedfac3b "usb/acpi:
Use ACPI methods to power off ports."

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c