From patchwork Tue Mar 20 12:11:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 10296947 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1886560385 for ; Tue, 20 Mar 2018 12:11:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08777289B1 for ; Tue, 20 Mar 2018 12:11:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F125D28AAA; Tue, 20 Mar 2018 12:11:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74FDF289B1 for ; Tue, 20 Mar 2018 12:11:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753022AbeCTMLP (ORCPT ); Tue, 20 Mar 2018 08:11:15 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:39420 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752905AbeCTMLP (ORCPT ); Tue, 20 Mar 2018 08:11:15 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 326AD80D; Tue, 20 Mar 2018 05:11:15 -0700 (PDT) Received: from e107155-lin.cambridge.arm.com (unknown [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 24ED73F24A; Tue, 20 Mar 2018 05:11:14 -0700 (PDT) From: Sudeep Holla To: Stephen Boyd Cc: Sudeep Holla , Michael Turquette , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] clk: scmi: use devm_of_clk_add_hw_provider() API and drop scmi_clocks_remove Date: Tue, 20 Mar 2018 12:11:07 +0000 Message-Id: <1521547867-23808-1-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519403030-21189-17-git-send-email-sudeep.holla@arm.com> References: <1519403030-21189-17-git-send-email-sudeep.holla@arm.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit aa795c41d9cd ("clk: Add devm_of_clk_add_hw_provider()/del_provider() APIs") adds devm_of_clk_add_hw_provider which takes care of deleting the clock provider when the clock providers device is removed. This patch makes use of devm_of_clk_add_hw_provider() instead of of_clk_add_hw_provider() so that we can eliminate the need of explicit scmi_clocks_remove for just doing of_clk_del_provider() Signed-off-by: Sudeep Holla Acked-by: Stephen Boyd --- drivers/clk/clk-scmi.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/clk/clk-scmi.c b/drivers/clk/clk-scmi.c index 26f1476d4a79..488c21376b55 100644 --- a/drivers/clk/clk-scmi.c +++ b/drivers/clk/clk-scmi.c @@ -172,15 +172,8 @@ static int scmi_clocks_probe(struct scmi_device *sdev) } } - return of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_data); -} - -static void scmi_clocks_remove(struct scmi_device *sdev) -{ - struct device *dev = &sdev->dev; - struct device_node *np = dev->of_node; - - of_clk_del_provider(np); + return devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, + clk_data); } static const struct scmi_device_id scmi_id_table[] = { @@ -192,7 +185,6 @@ MODULE_DEVICE_TABLE(scmi, scmi_id_table); static struct scmi_driver scmi_clocks_driver = { .name = "scmi-clocks", .probe = scmi_clocks_probe, - .remove = scmi_clocks_remove, .id_table = scmi_id_table, }; module_scmi_driver(scmi_clocks_driver);