powerpc/QE: use arch_initcall to probe QUICC Engine GPIOs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Tuesday, July 15, 2008 - 8:10 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d14b3d...
Commit:     d14b3dd6190af7ce4f88be68f8df828af6d44584
Parent:     2308c954f55eae9f165a5a59bbdb0a0c586afe5a
Author:     Anton Vorontsov <avorontsov@ru.mvista.com>
AuthorDate: Thu Jun 12 03:42:14 2008 +0400
Committer:  Kumar Gala <galak@kernel.crashing.org>
CommitDate: Thu Jun 26 01:49:09 2008 -0500

    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>
---
 arch/powerpc/sysdev/qe_lib/gpio.c |    5 ++++-
 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 c712e24..8e5a0bc 100644
--- a/arch/powerpc/sysdev/qe_lib/gpio.c
+++ b/arch/powerpc/sysdev/qe_lib/gpio.c
@@ -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);
diff --git a/include/asm-powerpc/qe.h b/include/asm-powerpc/qe.h
index 1355e72..edee15d 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
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
powerpc/QE: use arch_initcall to probe QUICC Engine GPIOs, Linux Kernel Mailing ..., (Tue Jul 15, 8:10 pm)