summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorJean-Christop PLAGNIOL-VILLARD2010-11-17 10:04:33 +0100
committerRussell King2010-11-26 11:51:04 +0100
commit6d803ba736abb5e122dede70a4720e4843dd6df4 (patch)
tree6d01199e41ede3ae3931664f7bd10a68dbcc42e6 /arch/arm/include
parentARM: 6396/1: Add SWP/SWPB emulation for ARMv7 processors (diff)
downloadkernel-qcow2-linux-6d803ba736abb5e122dede70a4720e4843dd6df4.tar.gz
kernel-qcow2-linux-6d803ba736abb5e122dede70a4720e4843dd6df4.tar.xz
kernel-qcow2-linux-6d803ba736abb5e122dede70a4720e4843dd6df4.zip
ARM: 6483/1: arm & sh: factorised duplicated clkdev.c
factorise some generic infrastructure to assist looking up struct clks for the ARM & SH architecture. as the code is identical at 99% put the arch specific code for allocation as example in asm/clkdev.h Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/clkdev.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/arch/arm/include/asm/clkdev.h b/arch/arm/include/asm/clkdev.h
index b56c1389b6fa..765d33222369 100644
--- a/arch/arm/include/asm/clkdev.h
+++ b/arch/arm/include/asm/clkdev.h
@@ -12,23 +12,13 @@
#ifndef __ASM_CLKDEV_H
#define __ASM_CLKDEV_H
-struct clk;
-struct device;
+#include <linux/slab.h>
-struct clk_lookup {
- struct list_head node;
- const char *dev_id;
- const char *con_id;
- struct clk *clk;
-};
+#include <mach/clkdev.h>
-struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id,
- const char *dev_fmt, ...);
-
-void clkdev_add(struct clk_lookup *cl);
-void clkdev_drop(struct clk_lookup *cl);
-
-void clkdev_add_table(struct clk_lookup *, size_t);
-int clk_add_alias(const char *, const char *, char *, struct device *);
+static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size)
+{
+ return kzalloc(size, GFP_KERNEL);
+}
#endif