From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/3] clkdev: factorize macro
Date: Thu, 11 Aug 2011 17:07:03 +0200 [thread overview]
Message-ID: <1313075225-27280-1-git-send-email-plagnioj@jcrosoft.com> (raw)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@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
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2011-08-11 15:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-11 15:07 Jean-Christophe PLAGNIOL-VILLARD [this message]
2011-08-11 15:07 ` [PATCH 2/3] nomadik: fix static allocation clkdev Jean-Christophe PLAGNIOL-VILLARD
2011-08-11 15:07 ` [PATCH 3/3] versatile: " Jean-Christophe PLAGNIOL-VILLARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1313075225-27280-1-git-send-email-plagnioj@jcrosoft.com \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox