public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk.h: Fix shim ifdef guard (HAVE_CLK -> COMMON_CLK)
@ 2012-08-27 15:28 Jeff Mahoney
  2012-08-27 18:52 ` Russell King
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Mahoney @ 2012-08-27 15:28 UTC (permalink / raw)
  To: Linux Kernel Maling List
  Cc: Viresh Kumar, Wolfram Sang, Greg Kroah-Hartman, Jeff Garzik,
	Andrew Lunn, Bhupesh Sharma, Giuseppe Cavallaro, Russell King,
	Mike Turquette, Sergei Shtylyov

Commit 93abe8e4 (clk: add non HAVE_CLK routines) added shims for
the clk code but HAVE_CLK isn't enough. It's possible to have the
clk support but not enable it. We end up with full prototypes for code
that is never built - causing module linking to fail later.

This patch changes the guard to use COMMON_CLK, which actually guards
the code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 include/linux/clk.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -120,7 +120,7 @@ static inline void clk_unprepare(struct
 }
 #endif
 
-#ifdef CONFIG_HAVE_CLK
+#ifdef CONFIG_COMMON_CLK
 /**
  * clk_get - lookup and obtain a reference to a clock producer.
  * @dev: device for clock "consumer"
@@ -276,7 +276,7 @@ struct clk *clk_get_parent(struct clk *c
  */
 struct clk *clk_get_sys(const char *dev_id, const char *con_id);
 
-#else /* !CONFIG_HAVE_CLK */
+#else /* !CONFIG_COMMON_CLK */
 
 static inline struct clk *clk_get(struct device *dev, const char *id)
 {


-- 
Jeff Mahoney
SUSE Labs

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [PATCH] clk.h: Fix shim ifdef guard (HAVE_CLK -> COMMON_CLK)
@ 2012-08-27 15:54 Jeff Mahoney
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Mahoney @ 2012-08-27 15:54 UTC (permalink / raw)
  To: Jeff Mahoney
  Cc: rmk, mturquette, gregkh, andrew, w.sang, jgarzik, sshtylyov,
	bhupesh.sharma, peppe.cavallaro, viresh.kumar, linux-kernel

Ugh. Ignore this one. I tested a build but just started getting build failures on different configs. I'll look into why later this afternoon.

-Jeff

--
Jeff Mahoney
(apologies for the top post -- from my mobile)

On Aug 27, 2012, at 11:27 AM, "Jeff Mahoney<jeffm@suse.com>" <jeffm@suse.com> wrote:

> Commit 93abe8e4 (clk: add non HAVE_CLK routines) added shims for
> the clk code but HAVE_CLK isn't enough. It's possible to have the
> clk support but not enable it. We end up with full prototypes for code
> that is never built - causing module linking to fail later.
> 
> This patch changes the guard to use COMMON_CLK, which actually guards
> the code.
> 
> Signed-off-by: Jeff Mahoney <jeffm@suse.com>
> ---
> include/linux/clk.h |    4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- a/include/linux/clk.h
> +++ b/include/linux/clk.h
> @@ -120,7 +120,7 @@ static inline void clk_unprepare(struct
> }
> #endif
> 
> -#ifdef CONFIG_HAVE_CLK
> +#ifdef CONFIG_COMMON_CLK
> /**
>  * clk_get - lookup and obtain a reference to a clock producer.
>  * @dev: device for clock "consumer"
> @@ -276,7 +276,7 @@ struct clk *clk_get_parent(struct clk *c
>  */
> struct clk *clk_get_sys(const char *dev_id, const char *con_id);
> 
> -#else /* !CONFIG_HAVE_CLK */
> +#else /* !CONFIG_COMMON_CLK */
> 
> static inline struct clk *clk_get(struct device *dev, const char *id)
> {
> 
> 
> -- 
> Jeff Mahoney
> SUSE Labs


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-28  0:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-27 15:28 [PATCH] clk.h: Fix shim ifdef guard (HAVE_CLK -> COMMON_CLK) Jeff Mahoney
2012-08-27 18:52 ` Russell King
2012-08-27 20:53   ` Jeff Mahoney
2012-08-28  0:51     ` Russell King
  -- strict thread matches above, loose matches on Subject: below --
2012-08-27 15:54 Jeff Mahoney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox