aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-12-01 01:35:29 -0500
committerShawn Guo <shawn.guo@linaro.org>2011-12-01 03:11:55 -0500
commit2a3267a489f1dc4284b64a4b88c62011946dc7ff (patch)
treeb2e33b58cc6b6220645f05889a6f8e10dbbfe82f /arch
parentcaca6a03d365883564885f2c1da3e88dcf65d139 (diff)
arm/imx: fix return type of callback passed to of_irq_init()
The of_irq_init() expects the callback passed by .data of of_device_id return 'int' instead of 'void'. This patch fixes it to have irq_init_cb() return the correct value, and in turn have the secondary interrupt controller (gpio in this case) initialized properly and also eliminate the error message 'of_irq_init: children remain, but no parents' which was overlooked before. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/mach-imx6q.c4
-rw-r--r--arch/arm/mach-mx5/imx51-dt.c7
-rw-r--r--arch/arm/mach-mx5/imx53-dt.c7
3 files changed, 13 insertions, 5 deletions
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 8bf5fa349484..eb7531bdfed7 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -36,7 +36,7 @@ static void __init imx6q_map_io(void)
36 imx_scu_map_io(); 36 imx_scu_map_io();
37} 37}
38 38
39static void __init imx6q_gpio_add_irq_domain(struct device_node *np, 39static int __init imx6q_gpio_add_irq_domain(struct device_node *np,
40 struct device_node *interrupt_parent) 40 struct device_node *interrupt_parent)
41{ 41{
42 static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS - 42 static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS -
@@ -44,6 +44,8 @@ static void __init imx6q_gpio_add_irq_domain(struct device_node *np,
44 44
45 irq_domain_add_simple(np, gpio_irq_base); 45 irq_domain_add_simple(np, gpio_irq_base);
46 gpio_irq_base += 32; 46 gpio_irq_base += 32;
47
48 return 0;
47} 49}
48 50
49static const struct of_device_id imx6q_irq_match[] __initconst = { 51static const struct of_device_id imx6q_irq_match[] __initconst = {
diff --git a/arch/arm/mach-mx5/imx51-dt.c b/arch/arm/mach-mx5/imx51-dt.c
index ccc61585659b..3451a463a79a 100644
--- a/arch/arm/mach-mx5/imx51-dt.c
+++ b/arch/arm/mach-mx5/imx51-dt.c
@@ -44,13 +44,14 @@ static const struct of_dev_auxdata imx51_auxdata_lookup[] __initconst = {
44 { /* sentinel */ } 44 { /* sentinel */ }
45}; 45};
46 46
47static void __init imx51_tzic_add_irq_domain(struct device_node *np, 47static int __init imx51_tzic_add_irq_domain(struct device_node *np,
48 struct device_node *interrupt_parent) 48 struct device_node *interrupt_parent)
49{ 49{
50 irq_domain_add_simple(np, 0); 50 irq_domain_add_simple(np, 0);
51 return 0;
51} 52}
52 53
53static void __init imx51_gpio_add_irq_domain(struct device_node *np, 54static int __init imx51_gpio_add_irq_domain(struct device_node *np,
54 struct device_node *interrupt_parent) 55 struct device_node *interrupt_parent)
55{ 56{
56 static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS - 57 static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS -
@@ -58,6 +59,8 @@ static void __init imx51_gpio_add_irq_domain(struct device_node *np,
58 59
59 irq_domain_add_simple(np, gpio_irq_base); 60 irq_domain_add_simple(np, gpio_irq_base);
60 gpio_irq_base += 32; 61 gpio_irq_base += 32;
62
63 return 0;
61} 64}
62 65
63static const struct of_device_id imx51_irq_match[] __initconst = { 66static const struct of_device_id imx51_irq_match[] __initconst = {
diff --git a/arch/arm/mach-mx5/imx53-dt.c b/arch/arm/mach-mx5/imx53-dt.c
index ccaa0b81b768..022bc0364b5f 100644
--- a/arch/arm/mach-mx5/imx53-dt.c
+++ b/arch/arm/mach-mx5/imx53-dt.c
@@ -48,13 +48,14 @@ static const struct of_dev_auxdata imx53_auxdata_lookup[] __initconst = {
48 { /* sentinel */ } 48 { /* sentinel */ }
49}; 49};
50 50
51static void __init imx53_tzic_add_irq_domain(struct device_node *np, 51static int __init imx53_tzic_add_irq_domain(struct device_node *np,
52 struct device_node *interrupt_parent) 52 struct device_node *interrupt_parent)
53{ 53{
54 irq_domain_add_simple(np, 0); 54 irq_domain_add_simple(np, 0);
55 return 0;
55} 56}
56 57
57static void __init imx53_gpio_add_irq_domain(struct device_node *np, 58static int __init imx53_gpio_add_irq_domain(struct device_node *np,
58 struct device_node *interrupt_parent) 59 struct device_node *interrupt_parent)
59{ 60{
60 static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS - 61 static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS -
@@ -62,6 +63,8 @@ static void __init imx53_gpio_add_irq_domain(struct device_node *np,
62 63
63 irq_domain_add_simple(np, gpio_irq_base); 64 irq_domain_add_simple(np, gpio_irq_base);
64 gpio_irq_base += 32; 65 gpio_irq_base += 32;
66
67 return 0;
65} 68}
66 69
67static const struct of_device_id imx53_irq_match[] __initconst = { 70static const struct of_device_id imx53_irq_match[] __initconst = {