Received: by 10.213.65.68 with SMTP id h4csp349455imn; Tue, 20 Mar 2018 05:13:04 -0700 (PDT) X-Google-Smtp-Source: AG47ELsNmPTkLcWzFkT0ACmDLbFu2EE4aa3TGypNuQakRvi42cucW7GoZ7lb+Qr3C1jISbqd02nX X-Received: by 10.99.110.198 with SMTP id j189mr8443046pgc.71.1521547984212; Tue, 20 Mar 2018 05:13:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521547984; cv=none; d=google.com; s=arc-20160816; b=Vkk+zIFAfe7B6PoDqG3/Wd4ar5M2K85cpc0VmTpaHcE8C+k50ERssvzfaQfTyw1HVP xk32Yoin3srCWb9p3rI3nMiqA8EsKJFscrCNHrC18m3dTWTAoltZKyJCk3j1Hr1EzjYZ dF4nGcwtnHrZEAqShd8cq7zVxQOT81G7H0frTl9kMARy9b7C5XSC+MckpEO5Lr2K1YFG 15i2d7UDVttrATlLlwV+coOlsntavFL1JhL6GPugdwH/Qw3WR0Nz24bvcJwxNYC8Ua1L StRyMDfhE1GslC92CSi7zsoZlpsShgDDhhnyuY8f+LiTtMVh9i0lgSBBWn/sXnHQ+DlV rJJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=pgjxEmkCT2xC6jFElkL2bhQ4TWKwKT/XQisxhh+Tdkk=; b=F1dR09VJ7A9nC4WwSmE4KvRgKqOBJyht+bLWIdsaMIkZMFdOM383lu5nMRDJchxqZA nvOBC9vJWJKsixEG2nmtU4rKJSpxg6Fes/+sUJTDOxiYuYNSQxeGs237NFAFBmdFzDsk mu19ufkPbHFe+ygjklH228CuOJI+WdmbgaHoXwU43NPgnS/AcClLjlR/wB4iee5Yc8l6 3WhDQiNdyzIMrbFE9bgTKQrgEgtAIw9V4ROq2S2me4O2h8CvGABVUBo+TJ+W5rMzjVzo S2j2eBN5d03ALtuJB9cTYZY12Dfy4jlV0G3wvSnuyxAqOT9filBzg0mOT3gVw9z4Jsfq WQOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3-v6si1516946plb.717.2018.03.20.05.12.49; Tue, 20 Mar 2018 05:13:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753208AbeCTMLQ (ORCPT + 99 others); Tue, 20 Mar 2018 08:11:16 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/clk/clk-scmi.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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); -- 2.7.4