[PATCH 1/3] clkdev: factorize macro

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Thu Aug 11 11:07:03 EDT 2011


Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 arch/arm/mach-at91/clock.h                    |   13 -------------
 arch/arm/mach-nomadik/include/mach/clkdev.h   |    6 ------
 arch/arm/mach-versatile/include/mach/clkdev.h |    6 ------
 include/linux/clkdev.h                        |   19 +++++++++++++++++++
 4 files changed, 19 insertions(+), 25 deletions(-)

diff --git a/arch/arm/mach-at91/clock.h b/arch/arm/mach-at91/clock.h
index c2e63e4..cacc0b5 100644
--- a/arch/arm/mach-at91/clock.h
+++ b/arch/arm/mach-at91/clock.h
@@ -32,16 +32,3 @@ struct clk {
 extern int __init clk_register(struct clk *clk);
 extern struct clk mck;
 extern struct clk utmi_clk;
-
-#define CLKDEV_CON_ID(_id, _clk)			\
-	{						\
-		.con_id = _id,				\
-		.clk = _clk,				\
-	}
-
-#define CLKDEV_CON_DEV_ID(_con_id, _dev_id, _clk)	\
-	{						\
-		.con_id = _con_id,			\
-		.dev_id = _dev_id,			\
-		.clk = _clk,				\
-	}
diff --git a/arch/arm/mach-nomadik/include/mach/clkdev.h b/arch/arm/mach-nomadik/include/mach/clkdev.h
index a9092a2..04b37a8 100644
--- a/arch/arm/mach-nomadik/include/mach/clkdev.h
+++ b/arch/arm/mach-nomadik/include/mach/clkdev.h
@@ -4,10 +4,4 @@
 #define __clk_get(clk) ({ 1; })
 #define __clk_put(clk) do { } while (0)
 
-#define CLKDEV_CON_ID(_id, _clk)			\
-	{						\
-		.con_id = _id,				\
-		.clk = _clk,				\
-	}
-
 #endif
diff --git a/arch/arm/mach-versatile/include/mach/clkdev.h b/arch/arm/mach-versatile/include/mach/clkdev.h
index a9092a2..04b37a8 100644
--- a/arch/arm/mach-versatile/include/mach/clkdev.h
+++ b/arch/arm/mach-versatile/include/mach/clkdev.h
@@ -4,10 +4,4 @@
 #define __clk_get(clk) ({ 1; })
 #define __clk_put(clk) do { } while (0)
 
-#define CLKDEV_CON_ID(_id, _clk)			\
-	{						\
-		.con_id = _id,				\
-		.clk = _clk,				\
-	}
-
 #endif
diff --git a/include/linux/clkdev.h b/include/linux/clkdev.h
index ae38e1a..d2eca99 100644
--- a/include/linux/clkdev.h
+++ b/include/linux/clkdev.h
@@ -33,4 +33,23 @@ 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_d *);
 
+#define CLKDEV_DEV_ID(_id, _clk)			\
+	{						\
+		.dev_id = _id,				\
+		.clk = _clk,				\
+	}
+
+#define CLKDEV_CON_ID(_id, _clk)			\
+	{						\
+		.con_id = _id,				\
+		.clk = _clk,				\
+	}
+
+#define CLKDEV_CON_DEV_ID(_con_id, _dev_id, _clk)	\
+	{						\
+		.con_id = _con_id,			\
+		.dev_id = _dev_id,			\
+		.clk = _clk,				\
+	}
+
 #endif
-- 
1.7.5.4




More information about the barebox mailing list