clkdev: Add default clkdev.h
Subsystems (2)
PATCH 1/1 clkdev: Add default clkdev.h
Ease the deployment of clkdev by providing a default asm/clkdev.h which will be used if the arch does not have an include/asm/clkdev.h.
---
The discussion on the previous posting of this patch suggested we should be merging this via clk (or possibly clkdev).
include/asm-generic/Kbuild.asm | 4 ++++ include/asm-generic/clkdev.h | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 include/asm-generic/clkdev.h
include/asm-generic/Kbuild.asm +4 -0
@@ -13,6 +13,10 @@ ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ header-y += a.out.h endif +ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/clkdev.h),) +generic-y += clkdev.h +endif + header-y += auxvec.h header-y += bitsperlong.h header-y += byteorder.h
include/asm-generic/clkdev.h new file +26 -0
@@ -0,0 +1,26 @@ +/* +* include/asm-generic/clkdev.h +* +* Based on the ARM clkdev.h: +* Copyright (C) 2008 Russell King. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* Helper for the clk API to assist looking up a struct clk. +*/ +#ifndef __ASM_CLKDEV_H +#define __ASM_CLKDEV_H + +#include <linux/slab.h> + +static inline int __clk_get (clk ) {return 1 ; } +static inline void __clk_put (clk ) { } + +static inline struct clk_lookup_alloc *__clkdev_alloc (size_t size) +{ +return kzalloc (size,GFP_KERNEL ); +} + +#endif
Signature · 1 line
1.7.10
Hi Mark,
include/asm-generic/clkdev.h line 19
Quoted 3 lines · On Tue, 3 Jul 2012 16:23:35 +0100 Mark Brown…
include/asm-generic/clkdev.h new file +2
-0+static inline int __clk_get (clk ) {return 1 ; } +static inline void __clk_put (clk ) { }
struct clk;
static inline int __clk_get(struct clk *clk) { return 1; } static inline void __clk_put(struct clk *clk) { }
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
include/asm-generic/Kbuild.asm ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ · line 18
Quoted 9 lines · Mark Brown
include/asm-generic/Kbuild.asm +3
-0@@ -13,6 +13,10 @@ ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ header-y += a.out.h endif +ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/clkdev.h),) +generic-y += clkdev.h +endif
Quoting Sam:
"Any use of wildcards in include/asm-generic/Kbuild.asm is bogus."
http://lkml.indiana.edu/hypermail/linux/kernel/1206.2/01507.html
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 4 lines · Geert Uytterhoeven
Quoting Sam:
"Any use of wildcards ininclude/asm-generic/Kbuild.asmis bogus."http://lkml.indiana.edu/hypermail/linux/kernel/1206.2/01507.html
Without actually explaining why which isn't terribly helpful :/
As far as I can tell it looks like this is for headers which may optionally be absent but clkdev.h is a header which should never be absent, either the architecture defines it or it uses the generic one.
As I said further up the thread having to go round ever single architecture and get them to actually apply patches for stuff like this is needlessly painful.