powerpc/QE: use arch_initcall to probe QUICC Engine GPIOs
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Wed, 11 Jun 2008 23:42:14 +0000 (03:42 +0400)
committerKumar Gala <galak@kernel.crashing.org>
Thu, 26 Jun 2008 06:49:09 +0000 (01:49 -0500)
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>
arch/powerpc/sysdev/qe_lib/gpio.c
include/asm-powerpc/qe.h

index c712e24..8e5a0bc 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/io.h>
 #include <linux/of.h>
@@ -102,7 +103,7 @@ static int qe_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
        return 0;
 }
 
-void __init qe_add_gpiochips(void)
+static int __init qe_add_gpiochips(void)
 {
        struct device_node *np;
 
@@ -143,4 +144,6 @@ err:
                kfree(qe_gc);
                /* try others anyway */
        }
+       return 0;
 }
+arch_initcall(qe_add_gpiochips);
index 1355e72..edee15d 100644 (file)
@@ -101,7 +101,6 @@ struct qe_pio_regs {
 #endif
 };
 
-extern void __init qe_add_gpiochips(void);
 extern int par_io_init(struct device_node *np);
 extern int par_io_of_config(struct device_node *np);
 #define QE_PIO_DIR_IN  2