summaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/cdns3/core.c')
-rw-r--r--drivers/usb/cdns3/core.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index 039ab5d2435e..1991cb5cf6bf 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -465,11 +465,8 @@ static int cdns3_probe(struct platform_device *pdev)
cdns->xhci_res[1] = *res;
cdns->dev_irq = platform_get_irq_byname(pdev, "peripheral");
- if (cdns->dev_irq == -EPROBE_DEFER)
- return cdns->dev_irq;
-
if (cdns->dev_irq < 0)
- dev_err(dev, "couldn't get peripheral irq\n");
+ return cdns->dev_irq;
regs = devm_platform_ioremap_resource_byname(pdev, "dev");
if (IS_ERR(regs))
@@ -477,14 +474,9 @@ static int cdns3_probe(struct platform_device *pdev)
cdns->dev_regs = regs;
cdns->otg_irq = platform_get_irq_byname(pdev, "otg");
- if (cdns->otg_irq == -EPROBE_DEFER)
+ if (cdns->otg_irq < 0)
return cdns->otg_irq;
- if (cdns->otg_irq < 0) {
- dev_err(dev, "couldn't get otg irq\n");
- return cdns->otg_irq;
- }
-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "otg");
if (!res) {
dev_err(dev, "couldn't get otg resource\n");
@@ -569,7 +561,8 @@ static int cdns3_probe(struct platform_device *pdev)
device_set_wakeup_capable(dev, true);
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
- pm_runtime_forbid(dev);
+ if (!(cdns->pdata && (cdns->pdata->quirks & CDNS3_DEFAULT_PM_RUNTIME_ALLOW)))
+ pm_runtime_forbid(dev);
/*
* The controller needs less time between bus and controller suspend,