Skip to content

Commit d14b3dd

Browse files
Anton Vorontsovkumargala
authored andcommitted
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 <[email protected]> Signed-off-by: Kumar Gala <[email protected]>
1 parent 2308c95 commit d14b3dd

File tree

2 files changed

+4
-2
lines changed
  • arch/powerpc/sysdev/qe_lib
  • include/asm-powerpc

2 files changed

+4
-2
lines changed

arch/powerpc/sysdev/qe_lib/gpio.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*/
1313

1414
#include <linux/kernel.h>
15+
#include <linux/init.h>
1516
#include <linux/spinlock.h>
1617
#include <linux/io.h>
1718
#include <linux/of.h>
@@ -102,7 +103,7 @@ static int qe_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
102103
return 0;
103104
}
104105

105-
void __init qe_add_gpiochips(void)
106+
static int __init qe_add_gpiochips(void)
106107
{
107108
struct device_node *np;
108109

@@ -143,4 +144,6 @@ void __init qe_add_gpiochips(void)
143144
kfree(qe_gc);
144145
/* try others anyway */
145146
}
147+
return 0;
146148
}
149+
arch_initcall(qe_add_gpiochips);

include/asm-powerpc/qe.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ struct qe_pio_regs {
101101
#endif
102102
};
103103

104-
extern void __init qe_add_gpiochips(void);
105104
extern int par_io_init(struct device_node *np);
106105
extern int par_io_of_config(struct device_node *np);
107106
#define QE_PIO_DIR_IN 2

0 commit comments

Comments
 (0)