lkml.org 
[lkml]   [2012]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] clk.h: Fix shim ifdef guard (HAVE_CLK -> COMMON_CLK)
On Mon, Aug 27, 2012 at 11:28:15AM -0400, Jeff Mahoney 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.

This is wrong. COMMON_CLK is an _implementation_ of the CLK API. It
is not the only implementation in the kernel. Conditionalizing like
this breaks existing users.

HAVE_CLK is the right thing here - if you define HAVE_CLK then you _are_
providing an implementation of clk_get() et.al. If you're not, then you
do not define HAVE_CLK. Simples.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:


\
 
 \ /
  Last update: 2012-08-27 21:41    [W:0.049 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site