From patchwork Mon Nov 20 17:06:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Th=C3=A9o_Lebrun?= X-Patchwork-Id: 13461602 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="bqXXNWdp" Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76D28BE; Mon, 20 Nov 2023 09:06:10 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 84998E0005; Mon, 20 Nov 2023 17:06:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700499969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fQQDcKI+dpqgp9ry2CvzyMUklTw/BkteRs5/KYF01kQ=; b=bqXXNWdpzIkufw4/eBc9jm55Uw3x8QkodfspyE1V7Jt+eTNF+aB5jVNMr63m7CJKLPL9V/ 25zj0k/IZmeIlj2rNI9vNOSsHQ1zIsBpG9jm8NDXSlWdiao3FRmKMgZsojofjej2IsLGQn 4eUhchBUDXdeiYU1BlCqjjwjm3ruF33e6vUAI1nI5MXjt4EX83GhArHCoA4z3MQ0VlRUBY 7kjlZPtdgMbG7ja9akO+ifJXVaAAzpSF9+3bRs/HDtUD3hXeITuXdenKFW4ESOuknxNc8r quOGntw4hqr2MDIbSBQKIhDfbNaVrP6+saU9tTuCjXizS1knc8rGLiNcuN/k6A== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Mon, 20 Nov 2023 18:06:02 +0100 Subject: [PATCH v2 2/7] usb: cdns3-ti: remove runtime PM Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231120-j7200-usb-suspend-v2-2-038c7e4a3df4@bootlin.com> References: <20231120-j7200-usb-suspend-v2-0-038c7e4a3df4@bootlin.com> In-Reply-To: <20231120-j7200-usb-suspend-v2-0-038c7e4a3df4@bootlin.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Roger Quadros , Peter Chen , Pawel Laszczak , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "Thomas Petazzoni thomas.petazzoni"@bootlin.com, =?utf-8?q?Gr=C3=A9gory_Cl?= =?utf-8?q?ement?= , =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.12.3 X-GND-Sasl: theo.lebrun@bootlin.com 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 --- 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); }