From patchwork Wed Mar 24 15:18:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 407874 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp502164jai; Wed, 24 Mar 2021 08:19:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyVxm7B/1v0FOQE5FMhusfOOxl5CtVeMjKnGA3MsU30+sBLToevWlfP0AAB0Dd/CLnoYa/ X-Received: by 2002:a17:90a:ff05:: with SMTP id ce5mr3928521pjb.156.1616599182841; Wed, 24 Mar 2021 08:19:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616599182; cv=none; d=google.com; s=arc-20160816; b=n0tNdR1eCfa5Wgi56T+QNzlEFgqmHunnaXm3Imj19qpET7ybQ7HOdH/Pap/3V2L3U3 5O57wZOceXZim5vw0RzVzrbfGvc1Z2o6lCl+2rbVXboR/OkRTSHVyLcmlCDBGf1L9kiM Bz4yzQF+f+PoFbmN4KUm+oJZPubVZT1Q9ZuT82OnWUVKCfOWNbasDCj24NRaZWnYt5a6 HWqt26syxHIpyY/VyNm4JnDi/xPT0ahARrpQcppzG7urEKCuaQXVmR19P6mO2RZqq6pM ex2xzu19J7wpeh+kH+mFnx6GrcjTRwDGt5MDITfd9lIVn2QvrbY0POqVtTZRYKKEddb5 XRyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=ljQgJF7yAqYvfuz3+8qFZjFvbp2Z4BSJcRR02ie0YGw=; b=GF8Ym2g4HYo/ytbvR9UwQ5cixxXsFNFylZ0Wz+dgpNCv44VJYupL1H/SwUBIFxHYxI jAENKyCM0EzGe0WcJdQRZ6TU+o0maR0TU1qHHqxAaPP5lJXHy4yqKgHsGpKKGO01WfgK V0E/iOXEEEth/rnr3YqhVPq+kIh70u8Q6NR4FiAMMTMONWvisjIrOpr3lA5xqUIeaKTi LcwNw/hIRfz9aYBBY+wkE5Nk+PTGzgk16iAefPkT9aBXpJdobNpFW8vWWNMxDqO0L2Em 1JoqCI94iTR27VQ8WMUkk3P7uofnTI220YXW4Hf2vW17/l0kmEm2JUwD18cvXdig9V8p 4Fng== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Tc25TD5+; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id l1si2390082plt.82.2021.03.24.08.19.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 08:19:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Tc25TD5+; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 155FE6EC5D; Wed, 24 Mar 2021 15:19:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by gabe.freedesktop.org (Postfix) with ESMTPS id 31E046EA1F for ; Wed, 24 Mar 2021 15:19:30 +0000 (UTC) Received: by mail-lf1-x132.google.com with SMTP id w37so32506798lfu.13 for ; Wed, 24 Mar 2021 08:19:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cjAMUv7MIhb1KdQ27o54N1t7Ve1qx874G712Y764Vm0=; b=Tc25TD5+7Gwo1HO4vQj/3EiBeyJcsnhH7fA3aeCN5TNcqbP/oVU4HMDFXqOtqwP+P2 Zdq93VMu2vCBVadNX3nvEKyzRcDkbHi5u2/7Avu8aDQtVOtDidA95usU5UlmTP+MJ/R6 sVguu0bJ75WatTP8XaB3NJPDsLzgw/cpxzjobzcFr8p3kaQeKo57bqtNmE82PfYjpSy1 ALGNzNRoBz1hiCw566AJcCM/S2N5vCB83Fk0QWPJT3VWfBIoZiTqvExohdsc93hFEM+I m2YFbOjtRW6ndpLOdLmt8Zb49bk/7dz3sjQR81yB/rfa3Un0WCyMj02Fn14szlge6Tfv vP1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cjAMUv7MIhb1KdQ27o54N1t7Ve1qx874G712Y764Vm0=; b=s4Xq99b8wpXZMFSO97zWG7/M80/hYpJcfMFbQpMWrqeyUHkZAb7Xp7p8BuA5CgXxWt hE5dLyHOfVhjlsH07g8KEL0tTjXc3HJw0AphLc0a99pKnzGXdeeE47ZYD2a3neFGJnmT 90x2dJMXpVbUmsm+6Ad89pHKKzrYJ9ZFldT3kwjbF6WaWtMOE5ApWtceUh8UMfqLMDTx ecN/sIulI3lREFJUqzfn/g7Zjm7Geg1Fj95sT45PPo+T6p6ApldTVOKL7pjvAhvDkfk7 c4rGP2+Pqm8e3Ekk3BStVGiTAnZnB3XaFsDIUtBMleTA9Np993sDrwZEeWUV/Go7z2gB TMWg== X-Gm-Message-State: AOAM5339/VW8NKpuVhKDOSWWxLCOdd+tpI2oGxq2cdBEIPy8zYNDwF48 aS1X/oaw9YhWi99/wIhjNZKKQQ== X-Received: by 2002:ac2:5fa2:: with SMTP id s2mr2232448lfe.486.1616599168652; Wed, 24 Mar 2021 08:19:28 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id d22sm255199lfm.267.2021.03.24.08.19.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 08:19:27 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Jonathan Marek , Michael Turquette Subject: [PATCH v2 16/28] drm/msm/dsi: use devm_of_clk_add_hw_provider Date: Wed, 24 Mar 2021 18:18:34 +0300 Message-Id: <20210324151846.2774204-17-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210324151846.2774204-1-dmitry.baryshkov@linaro.org> References: <20210324151846.2774204-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org, linux-clk@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Use devm_of_clk_add_hw_provider() to register provided clocks. This allows dropping the remove function alltogether. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) -- 2.30.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c index 4a8577a08f57..74a4e2daade8 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c @@ -728,7 +728,7 @@ static int dsi_phy_driver_probe(struct platform_device *pdev) } } - ret = of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get, + ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, phy->provided_clocks); if (ret) { DRM_DEV_ERROR(dev, "%s: failed to register clk provider: %d\n", __func__, ret); @@ -742,31 +742,11 @@ static int dsi_phy_driver_probe(struct platform_device *pdev) return 0; fail: - if (phy->pll) { - of_clk_del_provider(dev->of_node); - phy->pll = NULL; - } - return ret; } -static int dsi_phy_driver_remove(struct platform_device *pdev) -{ - struct msm_dsi_phy *phy = platform_get_drvdata(pdev); - - if (phy && phy->pll) { - of_clk_del_provider(pdev->dev.of_node); - phy->pll = NULL; - } - - platform_set_drvdata(pdev, NULL); - - return 0; -} - static struct platform_driver dsi_phy_platform_driver = { .probe = dsi_phy_driver_probe, - .remove = dsi_phy_driver_remove, .driver = { .name = "msm_dsi_phy", .of_match_table = dsi_phy_dt_match,