diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2008-06-11 19:42:14 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2008-06-26 02:49:09 -0400 |
commit | d14b3dd6190af7ce4f88be68f8df828af6d44584 (patch) | |
tree | 510889655bcdeca927bffc5a22421e6b5d942b38 | |
parent | 2308c954f55eae9f165a5a59bbdb0a0c586afe5a (diff) |
powerpc/QE: use arch_initcall to probe QUICC Engine GPIOs
It was discussed that global arch_initcall() is preferred way to probe
QE GPIOs, so let's use it.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/gpio.c | 5 | ||||
-rw-r--r-- | include/asm-powerpc/qe.h | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/gpio.c b/arch/powerpc/sysdev/qe_lib/gpio.c index c712e245dc4c..8e5a0bc36d0b 100644 --- a/arch/powerpc/sysdev/qe_lib/gpio.c +++ b/arch/powerpc/sysdev/qe_lib/gpio.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | ||
15 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
16 | #include <linux/io.h> | 17 | #include <linux/io.h> |
17 | #include <linux/of.h> | 18 | #include <linux/of.h> |
@@ -102,7 +103,7 @@ static int qe_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) | |||
102 | return 0; | 103 | return 0; |
103 | } | 104 | } |
104 | 105 | ||
105 | void __init qe_add_gpiochips(void) | 106 | static int __init qe_add_gpiochips(void) |
106 | { | 107 | { |
107 | struct device_node *np; | 108 | struct device_node *np; |
108 | 109 | ||
@@ -143,4 +144,6 @@ err: | |||
143 | kfree(qe_gc); | 144 | kfree(qe_gc); |
144 | /* try others anyway */ | 145 | /* try others anyway */ |
145 | } | 146 | } |
147 | return 0; | ||
146 | } | 148 | } |
149 | arch_initcall(qe_add_gpiochips); | ||
diff --git a/include/asm-powerpc/qe.h b/include/asm-powerpc/qe.h index 1355e7267013..edee15d269ea 100644 --- a/include/asm-powerpc/qe.h +++ b/include/asm-powerpc/qe.h | |||
@@ -101,7 +101,6 @@ struct qe_pio_regs { | |||
101 | #endif | 101 | #endif |
102 | }; | 102 | }; |
103 | 103 | ||
104 | extern void __init qe_add_gpiochips(void); | ||
105 | extern int par_io_init(struct device_node *np); | 104 | extern int par_io_init(struct device_node *np); |
106 | extern int par_io_of_config(struct device_node *np); | 105 | extern int par_io_of_config(struct device_node *np); |
107 | #define QE_PIO_DIR_IN 2 | 106 | #define QE_PIO_DIR_IN 2 |