It initializes the controller wakeup setting as default enabled unless the user changes it, whether the controller responds the wakeup event depends on roothub's wakeup setting since the wakeup occurs at the bus not the controller itself. With this change, the controller uses this driver could have wakeup capability due to device_may_wakeup(dev) at xhci_plat_suspend is default true; without this change, this value is always false. Reviewed-by: Jun Li <jun.li@xxxxxxx> Suggested-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Peter Chen <peter.chen@xxxxxxx> --- drivers/usb/host/xhci-plat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 14ff65a387e8..0ef28b2caea3 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -287,7 +287,7 @@ static int xhci_plat_probe(struct platform_device *pdev) *priv = *priv_match; } - device_wakeup_enable(hcd->self.controller); + device_init_wakeup(hcd->self.controller, true); xhci->main_hcd = hcd; xhci->shared_hcd = __usb_create_hcd(driver, sysdev, &pdev->dev, -- 2.17.1