From patchwork Wed Mar 31 10:57:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 412849 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp383219jai; Wed, 31 Mar 2021 03:57:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBSMcdquRSmZn3EphlqZpHn+TIc1u9mYniE1jGKjiuc8EmijzVJVUtn9Fkb2c2v0EpD+Vn X-Received: by 2002:a63:5148:: with SMTP id r8mr2772865pgl.407.1617188278339; Wed, 31 Mar 2021 03:57:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617188278; cv=none; d=google.com; s=arc-20160816; b=tPrLG4/aUu8Q5m+/PPYAnScHWSeRBJq32bv1KU1WtsRNzsTuQaJU4ZrFbtFEhsK6Mf o6aRyH9f4NbKXx3tTdeMU389wJP2JBl94ziuOy5UOTkOxPw2e3gG9eU13LPn/kx9UCHK w2c4OSr6J+i4YuC69PqDwMyFetAsIGFYVXor5KLl5D2wytqKpSDGfMqMgu2U5mBvvcYn cOj1k07jgsltk57T/6Sq/8ZurguTMn32hiMctdQCrXKYhl6Wm6gf/A4snUT2YRLSYwW8 SBPqwLkILStqJvxpQwgcLOhXfqn9otHJaHKUcm8dLvsAw2do1n/2inXOs2gYlDjfM4VC Rz8g== 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=8QZtJ6jmhOvWbUSDa9SOix62PwNjy8Id9ZKcgLk8g8o=; b=LDl+mnQjZfoCqZVQHNCLC8X69Zko47re1+t1WP9yg7G+KCS1jMCu7AWOan9zGdZZcG vZncv1Tfi8ysERhSBxJU7EiEhPAq79m/vC2wsGvh1x43hyOxcMcLCn6PlOzZ7TioTHOU tiXLAk7TlD7N3c85gVYp+OdC0OaK3JMek4ytp7JYBzJ1ugLVGO+3/0SuRsV8AXIfxcOv oozJif9IrpTYjoeYRlnCp2B4AIqsWVGt3/ijGp4csNHHbKUB3Tc3noHXNspSatwj5OCZ vKrQDD5CuUhtCms5iTHjf8WT9qXB5pNpE3obVzlhl0xhCu4eFYWC0/t8oSB+XuNAZhCv W/kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DdxFqg+U; 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 y5si1914100pff.295.2021.03.31.03.57.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 03:57:58 -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=DdxFqg+U; 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 89E046EA53; Wed, 31 Mar 2021 10:57:51 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 512C66EA4E for ; Wed, 31 Mar 2021 10:57:49 +0000 (UTC) Received: by mail-lf1-x12f.google.com with SMTP id g8so28497930lfv.12 for ; Wed, 31 Mar 2021 03:57:49 -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=+QjMm9irtQduqRvHLr5gFloZB/AZPEuGn8xbbHk1b6E=; b=DdxFqg+UJ9FKMjIZZi6fUqHc4tQRMvdxxHSUffVfU9HMSXKru6kzhwCpfjYqStkBfC XT/FIkqJJHOafINowWPi9PbRGtpulo5RxKaAKD7YM4E/aHe+528vrocpPq4tROISvgT3 CntWnbju89GHH8MhAeBNJwu4Ad5bf7Zae66wHoajRteIgbRJktTRO9dQuRmJfJAY+TBA xcR8QJ6q33ZKrAK+ZSO0PIQqnhYyMQZB5x9+/fElOYsKfjIU3MYhS4Wl2GV8LdAt8Q++ twxhYWtg90yFKkpYDB9PvGqKH3ql3xUpMoE3unLNVZRvyJt753SVUCw1r+BYXrgj8J6T HAgQ== 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=+QjMm9irtQduqRvHLr5gFloZB/AZPEuGn8xbbHk1b6E=; b=MZ3iEfGbNa7SaPl0c31VLbLZJNRG5Fjmrd/da+oz3nfs/uoxhWUuowqKKGKMBBje4W 5y9+PzoOjrllQwvZKw/FGpuGSxlvTK//yDXcgSgGt+HrTI0s/UL5K0EvTOmpX99/s+by rfXGobvQ1sKjhrD6tffX6Lc5bBkjjqjKlgKzApSm83IfLSBtu7OXP6bjJqJ00bIZHlwO Bw6/g23pF1zAEc6fFrlTBepPgAmWowoNdocllN6HUHvF+CI3gr+VgVjvTEnbCZxWXhzT alCCiBRU7s4WrgPqK6sFbMzhLO6E184m5DevXyQQ4J3SxfL6yvN8Y+9WgiBJAg8jy21B Jd6g== X-Gm-Message-State: AOAM5334cNh/F7Gjrti2lpm+p9oFpcS/2CNo1I0/e0D1r6SMmQs6mt8y HhouZfKVaf372WPwEBcmm4th+w== X-Received: by 2002:a19:7716:: with SMTP id s22mr1877170lfc.542.1617188267795; Wed, 31 Mar 2021 03:57:47 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id h3sm184359ljc.67.2021.03.31.03.57.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 03:57:47 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Jonathan Marek , Michael Turquette Subject: [PATCH v4 12/24] drm/msm/dsi: use devm_of_clk_add_hw_provider Date: Wed, 31 Mar 2021 13:57:23 +0300 Message-Id: <20210331105735.3690009-13-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210331105735.3690009-1-dmitry.baryshkov@linaro.org> References: <20210331105735.3690009-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, Stephen Boyd , 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 Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor --- 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 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,