From patchwork Sat Mar 27 11:02:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 410141 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2160624jai; Sat, 27 Mar 2021 04:03:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwyV5o0RZWvNUBJw+MuAzAXdlLDnPXil8JY28Ga7itaMHEDVOsUMwkPzApYUJUrSFoVYOO X-Received: by 2002:a17:906:5e01:: with SMTP id n1mr19890851eju.359.1616843009244; Sat, 27 Mar 2021 04:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616843009; cv=none; d=google.com; s=arc-20160816; b=F6bLzocrQVO1CAJptpHvlI3orMBLCvE4dH/AMiJcLvxS9cd+plXLoWsDVoVGIQ+R9V PBB1e+/O2UFFj24IeWPjgS+rjWqiAZVwQQRzFVgctRyREkRJIYQXRYS4uw2n5nSo9Ox7 mPAkTX7idRz2bkqQpK3dfZ1umRpePKKxN5Vb7y+rR3A2TAtpqJgNkDbdX1AgXzS5aNU5 KtEKE1+tNb3JjLI3u761wFgwKMytkdOy1Wto3aKTNsAEtwYQUL3tOM/Xep14leAlkwPR pLCI4K7v8zSN1vm4lCuHMQXHG7EkqxmLgo0JHDUFUTpsftksk6dl/BKGwwMWWqDzzQFd kU6g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OBY+9qD1ZXGuyQtqkYcuydo9Ohc05hbMC90j6qWFkmU=; b=YvcZMdM8bAZXAo6EFjCw/jCNlxX/v6t0bHvFwwjkbL1YCwWvyiIm6hEJofvdci5Wjb exvA1/s3ZUq3H6bpWAPIm6Pl6HraMNujjAnjmSZFTp9GxF1+GpsHo/Omh/Q2X9UOqml/ RZkoOuPyWZaSIdTOtNH0FU1xAoBzNHGyBYSk4RpHKbmFByO+znyvkxR3MGhWDlgv4Nqt n0hFctEuOrhHBA+tc4wTyxA6f94FTwo5YCkr/ya8w3SiBj6pdvoilVJLt/OQ+OqgEX/0 KfD7gj/V+HHzExRMWJqYsInFdUGrPotV2uPC9sWXIELGO5hTcLh9bNE1XQyVD6OUh4MG 141w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Jqy6C/bJ"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c17si9600445edr.46.2021.03.27.04.03.29; Sat, 27 Mar 2021 04:03:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Jqy6C/bJ"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231492AbhC0LD1 (ORCPT + 17 others); Sat, 27 Mar 2021 07:03:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231522AbhC0LDY (ORCPT ); Sat, 27 Mar 2021 07:03:24 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DE6BC0613B2 for ; Sat, 27 Mar 2021 04:03:23 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id z25so10316001lja.3 for ; Sat, 27 Mar 2021 04:03:23 -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=OBY+9qD1ZXGuyQtqkYcuydo9Ohc05hbMC90j6qWFkmU=; b=Jqy6C/bJyTDxyFpUddfheGqkwv2uMvD4ASc2pcMh42Z2m6Zhixr6CYlu2MGKaBSYSs 3roH0ZUvanZ6bu0+jkaRauoEHtsl2Z1BqFw1nAyeggc0mNlHZ0vl9j1trxRmXDJOjA8E usYPujvXIadwyARtc1dMx4I3UzMjkSBQN9o1kzB5GqTlz9dhv/64yk2r8F1rzt1YU7En ODVkx/nE9qRP0Z1VB2+1aGLeaVFTdCChzHbheR9yMbehqS5Kv5RYTAjTDNBOWcPAPPI9 vs1iVw9HFIMyjlcCQ4NV5AdfiOGChkYdu6YTIXlAYK6HjwLTiPOsrp7M94805Qty0F+v 7ILg== 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=OBY+9qD1ZXGuyQtqkYcuydo9Ohc05hbMC90j6qWFkmU=; b=OMNmOPXm3pb3x2Vtg3OR5b59/DJEK/7lQzZzpXxMvWrhQwcZ5kgf7TSxmRCihrPqPt Ik88VlauJ90SzOLMirlrEdcrO6TQn3cyBkK02Xk9al/IG14uxP1JapiE/NgIR9MVDLky oIAyCOJ+5AbTsBdyVjAcyFsu5BHmMnFCjCkn5BqCtaKh+2Zu1Y4hRoWbzb7NsDpTPg0a 0QJtWSZIFxlRLUM/aQ5b02RFsMhemMtlaYjlKMSE67vnDJC1H4Ec+X+4zsdj1gGze+g4 XsduA5eAwS+fc0nFz22jP8GsAOjCuu0f3ubqiypnM1JgeRJZ4ier8DgDjAWARiNty2Sn ku5A== X-Gm-Message-State: AOAM532aSSkxYv17fs8MT5lDAvebFiVIzIabF3/rzeNKCjk0QGDomjzP pFdurAMh/D5YATG2nMEIjk3+RQ== X-Received: by 2002:a05:651c:1135:: with SMTP id e21mr11746387ljo.151.1616843001918; Sat, 27 Mar 2021 04:03:21 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id a8sm1513801ljn.96.2021.03.27.04.03.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Mar 2021 04:03:21 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Jonathan Marek , Michael Turquette Cc: Stephen Boyd , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-clk@vger.kernel.org Subject: [PATCH v3 13/25] drm/msm/dsi: use devm_of_clk_add_hw_provider Date: Sat, 27 Mar 2021 14:02:53 +0300 Message-Id: <20210327110305.3289784-14-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210327110305.3289784-1-dmitry.baryshkov@linaro.org> References: <20210327110305.3289784-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c index df3b91b0ea88..46561435a27d 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,