From: Anton Vorontsov Date: Wed, 11 Jun 2008 23:42:14 +0000 (+0400) Subject: powerpc/QE: use arch_initcall to probe QUICC Engine GPIOs X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d14b3dd6190af7ce4f88be68f8df828af6d44584;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Kumar Gala --- 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 @@ */ #include +#include #include #include #include @@ -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); 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 { #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