Received: by 2002:a05:622a:251a:b0:39a:b4a2:e86 with SMTP id cm26csp316861qtb; Wed, 19 Oct 2022 02:44:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7y9J5wOOdsNJi09GbwMiUEKL/recTV3Pzb8w5aMeF9caoyXthTCmJ8yWABmf/I++OJTj0D X-Received: by 2002:a05:6402:274c:b0:45c:bb27:3d39 with SMTP id z12-20020a056402274c00b0045cbb273d39mr6550453edd.163.1666172674303; Wed, 19 Oct 2022 02:44:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172674; cv=none; d=google.com; s=arc-20160816; b=EaT5GHMZ/bMZDRFXSnphTovNTzxuMVAdZwaMXgBcqnCG6mnbICnmjqc5aMFDA3VWzo 8JPGf/QdKyXYDSayqIjWIv5r6Eu3sAhumr4/GumuIYR8/YylHKt64eQ0Kv1r1gPMGwAW zJV7jaf4YvtOkz7hCIXZ47w88b5ZBTfh+RF2ugOIm9DRpDeXSo4D7LLyv5BmL+dPdash egyqQU6bkSWmPuOBvqTMWbolPXgJ0nhXHp+ChMxcCKlKMkGuO5YQUWiqGB/Iub63Yy3E 3awooCJHq9smS6lFjGiTwPp3vfv4n48owN4PcbDcX+P0GjKlQdeAZPvPfbiTEYtnbu2w SEGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=atcfmY/jmqQIDkqFn+2ogBecsN3vmqQGNqjD2GJ2Lhw=; b=GGbmBbQGb5TpeXnQaXYXMOkANprsQzTeM1eprveQ82nUCeNwFksDLfyaRY27HagkbG /XdYhgI5wl1YVId8Xlxaa79B4M+gIiHCXXfbfjtquvq+a2vIEkmHFNOG8UQ7rrJry2y8 G49wjD8tmd+HS5Zaoq4PbO8wOACCVVe8eXif3rBEtbum8K+1dfXN4nWDlYPYIsctMb1/ dnctkOE7UCRDnvnofA+RhKg6ge9+SIyQPnUHCttnPGaZJd/BzfL6tGDjFpDVASfr6Jmx 5sAcLHWFDuWVPTpe42nrU+R+RkqV7zimHgj3HQ/t7TqROpwTJBFAGXcaZ/NdO2aYyN1r RXZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RF7zIHnP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cf20-20020a170906b2d400b0078043d1e9fbsi10407395ejb.354.2022.10.19.02.43.51; Wed, 19 Oct 2022 02:44:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RF7zIHnP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230355AbiJSJdr (ORCPT + 99 others); Wed, 19 Oct 2022 05:33:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233755AbiJSJ3T (ORCPT ); Wed, 19 Oct 2022 05:29:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31A5EE8AA6; Wed, 19 Oct 2022 02:12:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BB24961834; Wed, 19 Oct 2022 09:02:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA55CC433D6; Wed, 19 Oct 2022 09:02:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170159; bh=iNGubPr7HaKVgh+TiSU6p3K2AlZjj1CtChzrtePmDaE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RF7zIHnPT90lCwEsULcHIcX6s9xTrAZ9Ik1dafd+wBkmbnPuwW334QP1YHY+tgVJt NWpkdHDyY8yOyUo7R2t87FJFoZfBVQ3ExAbfxY6CZUiGpF1wXqHM0W2HJqmmFzMoCl 4l0rpWTs4hoaIxnrAa4K8UAZeDqHNXZ2oZ8474Mo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold , Dmitry Baryshkov , Vinod Koul , Sasha Levin Subject: [PATCH 6.0 522/862] phy: qcom-qmp-usb: disable runtime PM on unbind Date: Wed, 19 Oct 2022 10:30:09 +0200 Message-Id: <20221019083313.046819184@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johan Hovold [ Upstream commit e57655e66806750785f9121c98a962404d02395b ] Make sure to disable runtime PM also on driver unbind. Fixes: ac0d239936bd ("phy: qcom-qmp: Add support for runtime PM"). Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220907110728.19092-10-johan+linaro@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 1d270356a97f..1eb4ec576361 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -2704,7 +2704,9 @@ static int qcom_qmp_phy_usb_probe(struct platform_device *pdev) return -ENOMEM; pm_runtime_set_active(dev); - pm_runtime_enable(dev); + ret = devm_pm_runtime_enable(dev); + if (ret) + return ret; /* * Prevent runtime pm from being ON by default. Users can enable * it using power/control in sysfs. @@ -2738,13 +2740,10 @@ static int qcom_qmp_phy_usb_probe(struct platform_device *pdev) phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); if (!IS_ERR(phy_provider)) dev_info(dev, "Registered Qcom-QMP phy\n"); - else - pm_runtime_disable(dev); return PTR_ERR_OR_ZERO(phy_provider); err_node_put: - pm_runtime_disable(dev); of_node_put(child); return ret; } -- 2.35.1