diff options
author | Joel Porquet <joel@porquet.org> | 2015-07-02 15:32:00 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-07-02 16:34:38 -0400 |
commit | 91e20b5040c67c51aad88cf87db4305c5bd7f79d (patch) | |
tree | 4e8d9b9886d2c5ee72931edae4c2e7709ba663b5 | |
parent | 93b6eb77b49064ed1de5726560a0849f3ebccc2c (diff) |
irqchip: Move IRQCHIP_DECLARE macro to include/linux/irqchip.h
At the moment the IRQCHIP_DECLARE macro is only declared locally in
drivers/irqchip/irqchip.h. It prevents from using it directly in arch/*
directories whenever irqchip drivers only exist there, which happens in a few
cases (e.g. arc, arm, microblaze and mips).
This patch makes the macro to be globally defined, i.e. in
include/linux/irqchip.h, and thus usable for arch-specific declarations of
irqchip drivers. In this way, it is very similar to what clocksource does (ie
CLOCKSOURCE_OF_DECLARE is defined in include/linux/clocksource.h).
For now, this patch only moves the declaration of the macro
IRQCHIP_DECLARE to the global header 'include/linux/irqchip.h' and make
'drivers/irqchip/irqchip.h' include 'include/linux/irqchip.h'. Later, other
patches will get rid of 'drivers/irqchip/irqchip.h' and modify all the impacted
irqchip drivers.
Signed-off-by: Joel Porquet <joel@porquet.org>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/1435865565-14114-1-git-send-email-joel@porquet.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | drivers/irqchip/irqchip.h | 19 | ||||
-rw-r--r-- | include/linux/irqchip.h | 14 |
2 files changed, 15 insertions, 18 deletions
diff --git a/drivers/irqchip/irqchip.h b/drivers/irqchip/irqchip.h index 0f6486d4f1b0..0f67ae32464f 100644 --- a/drivers/irqchip/irqchip.h +++ b/drivers/irqchip/irqchip.h | |||
@@ -8,21 +8,4 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef _IRQCHIP_H | 11 | #include <linux/irqchip.h> |
12 | #define _IRQCHIP_H | ||
13 | |||
14 | #include <linux/of.h> | ||
15 | |||
16 | /* | ||
17 | * This macro must be used by the different irqchip drivers to declare | ||
18 | * the association between their DT compatible string and their | ||
19 | * initialization function. | ||
20 | * | ||
21 | * @name: name that must be unique accross all IRQCHIP_DECLARE of the | ||
22 | * same file. | ||
23 | * @compstr: compatible string of the irqchip driver | ||
24 | * @fn: initialization function | ||
25 | */ | ||
26 | #define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn) | ||
27 | |||
28 | #endif | ||
diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h index 14d79131f53d..638887376e58 100644 --- a/include/linux/irqchip.h +++ b/include/linux/irqchip.h | |||
@@ -11,6 +11,20 @@ | |||
11 | #ifndef _LINUX_IRQCHIP_H | 11 | #ifndef _LINUX_IRQCHIP_H |
12 | #define _LINUX_IRQCHIP_H | 12 | #define _LINUX_IRQCHIP_H |
13 | 13 | ||
14 | #include <linux/of.h> | ||
15 | |||
16 | /* | ||
17 | * This macro must be used by the different irqchip drivers to declare | ||
18 | * the association between their DT compatible string and their | ||
19 | * initialization function. | ||
20 | * | ||
21 | * @name: name that must be unique accross all IRQCHIP_DECLARE of the | ||
22 | * same file. | ||
23 | * @compstr: compatible string of the irqchip driver | ||
24 | * @fn: initialization function | ||
25 | */ | ||
26 | #define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn) | ||
27 | |||
14 | #ifdef CONFIG_IRQCHIP | 28 | #ifdef CONFIG_IRQCHIP |
15 | void irqchip_init(void); | 29 | void irqchip_init(void); |
16 | #else | 30 | #else |