[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231120-j7200-usb-suspend-v2-2-038c7e4a3df4@bootlin.com>
Date: Mon, 20 Nov 2023 18:06:02 +0100
From: Théo Lebrun <theo.lebrun@...tlin.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Roger Quadros <rogerq@...nel.org>,
Peter Chen <peter.chen@...nel.org>,
Pawel Laszczak <pawell@...ence.com>,
Nishanth Menon <nm@...com>,
Vignesh Raghavendra <vigneshr@...com>,
Tero Kristo <kristo@...nel.org>
Cc: linux-usb@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
"Thomas Petazzoni thomas.petazzoni"@bootlin.com,
Grégory Clement <gregory.clement@...tlin.com>,
Théo Lebrun <theo.lebrun@...tlin.com>
Subject: [PATCH v2 2/7] usb: cdns3-ti: remove runtime PM
The driver does not use RPM. It enables it & gets a reference at probe.
It then undoes that on probe error or at remove.
Signed-off-by: Théo Lebrun <theo.lebrun@...tlin.com>
---
drivers/usb/cdns3/cdns3-ti.c | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c
index 5945c4b1e11f..dc1594acdcee 100644
--- a/drivers/usb/cdns3/cdns3-ti.c
+++ b/drivers/usb/cdns3/cdns3-ti.c
@@ -135,13 +135,6 @@ static int cdns_ti_probe(struct platform_device *pdev)
rate_code = i;
- pm_runtime_enable(dev);
- error = pm_runtime_get_sync(dev);
- if (error < 0) {
- dev_err(dev, "pm_runtime_get_sync failed: %d\n", error);
- goto err;
- }
-
/* assert RESET */
reg = cdns_ti_readl(data, USBSS_W1);
reg &= ~USBSS_W1_PWRUP_RST;
@@ -179,16 +172,10 @@ static int cdns_ti_probe(struct platform_device *pdev)
error = of_platform_populate(node, NULL, NULL, dev);
if (error) {
dev_err(dev, "failed to create children: %d\n", error);
- goto err;
+ return error;
}
return 0;
-
-err:
- pm_runtime_put_sync(data->dev);
- pm_runtime_disable(data->dev);
-
- return error;
}
static int cdns_ti_remove_core(struct device *dev, void *c)
@@ -205,8 +192,6 @@ static void cdns_ti_remove(struct platform_device *pdev)
struct device *dev = &pdev->dev;
device_for_each_child(dev, NULL, cdns_ti_remove_core);
- pm_runtime_put_sync(dev);
- pm_runtime_disable(dev);
platform_set_drvdata(pdev, NULL);
}
--
2.42.0
Powered by blists - more mailing lists