Messages in this thread | | | Date | Mon, 27 Aug 2012 19:52:48 +0100 | From | Russell King <> | Subject | Re: [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:
| |