From 161bfa98ba6f5b8970234e4392de1f5df4062452 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Fri, 20 Sep 2013 15:16:34 +0530 Subject: usb: dwc3: Remove redundant pci_set_drvdata Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/dwc3-pci.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/usb/dwc3') diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 2e252aae51ca..31443aeedcdb 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c @@ -165,7 +165,6 @@ static int dwc3_pci_probe(struct pci_dev *pci, return 0; err3: - pci_set_drvdata(pci, NULL); platform_device_put(dwc3); err1: pci_disable_device(pci); @@ -180,7 +179,6 @@ static void dwc3_pci_remove(struct pci_dev *pci) platform_device_unregister(glue->dwc3); platform_device_unregister(glue->usb2_phy); platform_device_unregister(glue->usb3_phy); - pci_set_drvdata(pci, NULL); pci_disable_device(pci); } -- cgit v1.2.3 From d9681ee0812a7502838032bc5f935c2af650b036 Mon Sep 17 00:00:00 2001 From: Vivek Gautam Date: Mon, 23 Sep 2013 09:08:28 +0530 Subject: usb: dwc3: Remove additional delay of 100ms when resuming This delay got introduced in: "7415f17 usb: dwc3: core: add power management support" which reflected similar code in dwc3_core_soft_reset() function. However, originally the delay of 100ms in dwc3_core_soft_reset() was meant to assist USB2PHY and USB3PHY reset, not for usb_phy_init() sequence. We should get rid of this delay, since things will still work fine without this. Reviewed-by: Jingoo Han Signed-off-by: Vivek Gautam Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/usb/dwc3') diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 474162e9d01d..e88ffae80cac 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -691,7 +691,6 @@ static int dwc3_resume(struct device *dev) usb_phy_init(dwc->usb3_phy); usb_phy_init(dwc->usb2_phy); - msleep(100); spin_lock_irqsave(&dwc->lock, flags); -- cgit v1.2.3 From 16b972a592ea2c9a3c2a3c12238de650fd4043a9 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Fri, 11 Oct 2013 08:34:28 -0500 Subject: usb: dwc3: core: use pm_runtime_put_sync() on remove We are going to disable runtime_pm and we're removing the driver, we must disable the device now. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb/dwc3') diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index e88ffae80cac..74f9cf02da07 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -584,7 +584,7 @@ static int dwc3_remove(struct platform_device *pdev) usb_phy_set_suspend(dwc->usb2_phy, 1); usb_phy_set_suspend(dwc->usb3_phy, 1); - pm_runtime_put(&pdev->dev); + pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); dwc3_debugfs_exit(dwc); -- cgit v1.2.3