From patchwork Wed Oct 19 08:30:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4891 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp225487wrs; Wed, 19 Oct 2022 02:43:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4QfjpclIDkSTzE5HeM1VnBmO6qq++ad0OOZ1ls7E68afmvLkjBi+LZJXGIWfJUZ1Bg10bK X-Received: by 2002:a17:906:eec1:b0:782:6384:76be with SMTP id wu1-20020a170906eec100b00782638476bemr5986155ejb.756.1666172596630; Wed, 19 Oct 2022 02:43:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172596; cv=none; d=google.com; s=arc-20160816; b=bsGiiJ9OlhO0f6sEplz6/Hl+9WFwPBlQ+Fyk3IJTOIK84QD5gXaBFVS53geCou7fQm B7bXwNxSZ9FeFEFmbKNAJ9nbxxdeT1uffm5VMTUkjeaVNjEiI4pP0cgcwRrDXLmzLZO1 bOI+g6063ImmWjbveq52GCu25j/IEOwsD5/eqxsmcmtaDOh9oy+i9XA219aBRggh8cqb ejSm5zOPFZspXz5/zxKv4RngFfVUZWUskHLFAt/VflXSVkorkvTsnaI92wb/4Q/ltQ/l VdDcRzM6VsD7DbVCmik8wUKNGs6XLdHT5tMca+ksPILriNKwtrCt7Tu9zFZ+EMRWP78v ZVUw== 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 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.42.50; Wed, 19 Oct 2022 02:43:16 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747108596775531852?= X-GMAIL-MSGID: =?utf-8?q?1747108596775531852?= 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; }