linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-arch@vger.kernel.org, Russell King <linux@armlinux.org.uk>
Subject: [PATCH 5/5] clk: Move __clk_{get,put}() into private clk.h API
Date: Tue,  2 Jan 2018 17:35:16 -0800	[thread overview]
Message-ID: <20180103013516.18844-6-sboyd@codeaurora.org> (raw)
In-Reply-To: <20180103013516.18844-1-sboyd@codeaurora.org>

We can move these APIs into the private header file now that we
don't have any users of the __clk_get() and __clk_put() APIs
outside of clkdev.c and clk.c.

Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 drivers/clk/clk.h      | 4 ++++
 include/linux/clkdev.h | 8 --------
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/clk/clk.h b/drivers/clk/clk.h
index 00b35a13cdf3..70c0ba6336c1 100644
--- a/drivers/clk/clk.h
+++ b/drivers/clk/clk.h
@@ -20,6 +20,8 @@ struct clk *__of_clk_get_from_provider(struct of_phandle_args *clkspec,
 struct clk *__clk_create_clk(struct clk_hw *hw, const char *dev_id,
 			     const char *con_id);
 void __clk_free_clk(struct clk *clk);
+int __clk_get(struct clk *clk);
+void __clk_put(struct clk *clk);
 #else
 /* All these casts to avoid ifdefs in clkdev... */
 static inline struct clk *
@@ -32,5 +34,7 @@ static struct clk_hw *__clk_get_hw(struct clk *clk)
 {
 	return (struct clk_hw *)clk;
 }
+static inline int __clk_get(struct clk *clk) { return 1; }
+static inline void __clk_put(struct clk *clk) { }
 
 #endif
diff --git a/include/linux/clkdev.h b/include/linux/clkdev.h
index ef98ee8c6358..4890ff033220 100644
--- a/include/linux/clkdev.h
+++ b/include/linux/clkdev.h
@@ -52,12 +52,4 @@ int clk_add_alias(const char *, const char *, const char *, struct device *);
 int clk_register_clkdev(struct clk *, const char *, const char *);
 int clk_hw_register_clkdev(struct clk_hw *, const char *, const char *);
 
-#ifdef CONFIG_COMMON_CLK
-int __clk_get(struct clk *clk);
-void __clk_put(struct clk *clk);
-#else
-static inline int __clk_get(struct clk *clk) { return 1; }
-static inline void __clk_put(struct clk *clk) { }
-#endif
-
 #endif
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

  parent reply	other threads:[~2018-01-03  1:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-03  1:35 [PATCH 0/5] Remove asm/clkdev.h and privatize __clk{get,put}() Stephen Boyd
2018-01-03  1:35 ` Stephen Boyd
2018-01-03  1:35 ` [PATCH 1/5] blackfin: Use generic clkdev.h header Stephen Boyd
2018-01-10 21:20   ` Stephen Boyd
2018-01-10 21:20     ` Stephen Boyd
2018-01-03  1:35 ` [PATCH 2/5] clk: Prepare to remove asm-generic/clkdev.h Stephen Boyd
2018-01-10 21:20   ` Stephen Boyd
2018-01-10 21:20     ` Stephen Boyd
2018-01-03  1:35 ` [PATCH 3/5] arch: Remove clkdev.h asm-generic from Kbuild Stephen Boyd
2018-01-03  8:43   ` Geert Uytterhoeven
2018-01-03  8:43     ` Geert Uytterhoeven
2018-01-03 15:37   ` Arnd Bergmann
2018-01-03 15:37     ` Arnd Bergmann
2018-01-10 21:20   ` Stephen Boyd
2018-01-10 21:20     ` Stephen Boyd
2018-01-03  1:35 ` [PATCH 4/5] clk: sunxi: Use CLK_IS_CRITICAL flag for critical clks Stephen Boyd
2018-01-03  2:58   ` Chen-Yu Tsai
2018-01-03 17:01     ` Stephen Boyd
2018-01-04 13:13   ` Maxime Ripard
2018-01-10 21:20   ` Stephen Boyd
2018-01-10 21:20     ` Stephen Boyd
2018-01-03  1:35 ` Stephen Boyd [this message]
2018-01-03  1:35   ` [PATCH 5/5] clk: Move __clk_{get,put}() into private clk.h API Stephen Boyd
2018-01-10 21:20   ` Stephen Boyd
2018-01-10 21:20     ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180103013516.18844-6-sboyd@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mturquette@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).