From patchwork Sun May 22 05:33:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 68317 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp630316qge; Sat, 21 May 2016 22:34:20 -0700 (PDT) X-Received: by 10.98.5.5 with SMTP id 5mr17419534pff.58.1463895260650; Sat, 21 May 2016 22:34:20 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id se4si41143965pac.61.2016.05.21.22.34.20; Sat, 21 May 2016 22:34:20 -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; dkim=pass header.i=@nifty.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 S1751378AbcEVFeK (ORCPT + 30 others); Sun, 22 May 2016 01:34:10 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:22063 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750736AbcEVFeF (ORCPT ); Sun, 22 May 2016 01:34:05 -0400 Received: from grover.sesame (FL1-119-242-215-193.osk.mesh.ad.jp [119.242.215.193]) (authenticated) by conuserg-07.nifty.com with ESMTP id u4M5XalW026067; Sun, 22 May 2016 14:33:41 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com u4M5XalW026067 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1463895222; bh=KIhOLayC50hOMg/q14RqnchKZotwpptropfB23O4pNw=; h=From:To:Cc:Subject:Date:From; b=DhBgJLRY/z19SgKoZoPrw++YLK8HYzg9tURpoVgybHRVy1DWG9ZzU49aR1sqpiYY1 4YsFOwoZ/PUJ5liBDWozYpsmMO+uomV/vq1rMsaqGI6VXHbl2oSsTGleQJWOTjrbw8 YqJt+Jf2NztE7yLIXPIzKqHXHsPylhj6qXpvLtAPK/ruVYpLSgDpslp4e1B8kQctF2 DmRDk3KElso3KhpvqAuvYsA+CqxpqcDML6xlgUv/ek/Bd+oEqyetHFDvFYSOd6a/c1 tI/ehOHRWXB14HVogEgB9po5BnwXFPLPtjpSINYHOvkPEn2/n+xG7A0iwW0Hwt4CH+ MxFTaeTYJv1/A== X-Nifty-SrcIP: [119.242.215.193] From: Masahiro Yamada To: linux-clk@vger.kernel.org Cc: Masahiro Yamada , Stephen Boyd , Michael Turquette , linux-kernel@vger.kernel.org Subject: [PATCH] clk: fixed-rate: add clk_hw_unregister_fixed_rate() Date: Sun, 22 May 2016 14:33:35 +0900 Message-Id: <1463895215-28754-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This will be used to migrate to the clk_hw APIs. Signed-off-by: Masahiro Yamada --- drivers/clk/clk-fixed-rate.c | 11 +++++++++++ include/linux/clk-provider.h | 1 + 2 files changed, 12 insertions(+) -- 1.9.1 diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c index 8e4453e..2edb393 100644 --- a/drivers/clk/clk-fixed-rate.c +++ b/drivers/clk/clk-fixed-rate.c @@ -145,6 +145,17 @@ void clk_unregister_fixed_rate(struct clk *clk) } EXPORT_SYMBOL_GPL(clk_unregister_fixed_rate); +void clk_hw_unregister_fixed_rate(struct clk_hw *hw) +{ + struct clk_fixed_rate *fixed; + + fixed = to_clk_fixed_rate(hw); + + clk_hw_unregister(hw); + kfree(fixed); +} +EXPORT_SYMBOL_GPL(clk_hw_unregister_fixed_rate); + #ifdef CONFIG_OF /** * of_fixed_clk_setup() - Setup function for simple fixed rate clock diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 0c72204..94e00fe 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -293,6 +293,7 @@ void clk_unregister_fixed_rate(struct clk *clk); struct clk_hw *clk_hw_register_fixed_rate_with_accuracy(struct device *dev, const char *name, const char *parent_name, unsigned long flags, unsigned long fixed_rate, unsigned long fixed_accuracy); +void clk_hw_unregister_fixed_rate(struct clk_hw *hw); void of_fixed_clk_setup(struct device_node *np);