Hello. On 09-01-2013 12:45, Lan Tianyu wrote:
This patch is to expose usb port's pm qos flags(pm_qos_no_power_off, pm_qos_remote_wakeup) to user space. User can set pm_qos_no_power_off flag to prohibit the port from being powered off.
Signed-off-by: Lan Tianyu <tianyu.lan@xxxxxxxxx> --- drivers/usb/core/port.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c index 77400f8..6bb5b2b 100644 --- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c
[...]
@@ -172,7 +173,15 @@ int usb_hub_create_port_device(struct usb_hub *hub, int port1) goto error_register; pm_runtime_set_active(&port_dev->dev); - pm_runtime_enable(&port_dev->dev); + + /* It would be dangerous if user space couldn't + * prevent usb device from being powered off. So not
s/not/don't/
+ * enable port runtime pm if fail to expose port's pm qos.
s/fail/failed/ WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html