Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2370706rdb; Mon, 20 Nov 2023 09:06:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGpf891pzO8ey/+38f6H8gGOMF9wZbpWW7FiI8zwGXADV66YtATUlAds82/iatDeXigY6ya X-Received: by 2002:a05:6a00:3695:b0:6cb:4e11:ca41 with SMTP id dw21-20020a056a00369500b006cb4e11ca41mr6515089pfb.26.1700500011880; Mon, 20 Nov 2023 09:06:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700500011; cv=none; d=google.com; s=arc-20160816; b=VynyadHYjMBPnW1zyKWj7DUy57g1NWfyr+09PcxGjZ96g2A9Gt1arWtx/C3GCjqHho dyCFUVftPet/4anFbbZ2Kxu/vsunU9AMszgySkEQElZfu/baR47Wx0cncXjn39JWxbM/ HK1EU46GZFvQWPQ3YLAG5YMYv5mgFjlyydP4UgdXfkk+Fl5pHPLJF/KdpuMqRlI/D+S2 JSmDOIRTwusgzGRVGchgx/w8jAAOQSCyusnqffRYUvaiUBP0CfpSkOWLIYB/Phz2+NLg 28pCbU3/cQApmgOZJG88OtQ3KxcoYo/SFPvChC+RnSTP/a+sWgw27D39IzXj77XqekF8 7kyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=fQQDcKI+dpqgp9ry2CvzyMUklTw/BkteRs5/KYF01kQ=; fh=djCqQyCPITk/fGPikTLjejqXUdBjmgm6+WoI1E5KrDk=; b=z32uwznPdQ/GTn5dupgbEUkMx4KVFpL7mvs7/grAcGSTI4O55ACvu6Ugdj611IMxAl J3SBvtHM0k5btdRBMY0MWR8SYw3PYHVcxMApPiipRY5M7/dndfjS5XIs8nelJ7jcMYvs JOI0ewRCvxn5C6whWBc629LGftM463d3BELZNoBobTdEqcl/5ZKYvH29xmgaITTEdFnN c9Z8VMhsDdjIEPoenDrrM+yJ27WXDBPK/CTVJaTSYGVrpmUwKNNFEFelUkFyILaq2XkL jCDw+TDd7mt5/VkzcUnRvqB4cOU8YtXH3FC6MvCVGFCYLIdRS6gJPcxcOIPv5kSBycXU BtwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=bqXXNWdp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id n186-20020a6327c3000000b005a0018ec785si8391932pgn.375.2023.11.20.09.06.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 09:06:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=bqXXNWdp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 03DAC8053943; Mon, 20 Nov 2023 09:06:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231715AbjKTRGS (ORCPT + 99 others); Mon, 20 Nov 2023 12:06:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230116AbjKTRGO (ORCPT ); Mon, 20 Nov 2023 12:06:14 -0500 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 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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_Clement?= , =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.12.3 X-GND-Sasl: theo.lebrun@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 20 Nov 2023 09:06:39 -0800 (PST) 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); } -- 2.42.0